Part Number Hot Search : 
BN1A4M TEF6890H 23VL100 MC1454 B1258 BC368ZL1 TMG3D60D FM1200W
Product Description
Full Text Search
 

To Download ADUC834 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  rev. p rc (12 march 2002) information furnished by analog devices is believed to be accurate and reliable. however, no responsibility is assumed by analog devices for its use, nor for any infringements of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of analog devices. a preliminary t echnical data ADUC834 one technology way, p.o. box 9106, norwood, ma 02062-9106, u.s.a. tel: 781/329-4700 www.analog.com fax: 781/326-8703 ? analog devices, inc., 2002 preliminary technical data microconverter ? , dual 16-/24- bit adcs with embedded 62kb flash mcu features high resolution sigma-delta adcs two independent adcs (16- and 24-bit resolution) 24-bit no missing codes, primary adc 13-bit p-p resolution @ 20 hz, 20 mv range 18-bit p-p resolution @ 20 hz, 2.56 v range memory 62kbytes on-chip flash/ee program memory 4 kbytes on-chip flash/ee data memory flash/ee, 100 yr retention, 100 kcycles endurance in circuit serial download high speed user bootload (5s download) 2304 bytes on-chip data ram 8051 based core 8051-compatible instruction set (12.58 mhz max) 32 khz external crystal, on-chip programmable pll 11 interrupt sources, two priority levels dual data pointer extended 11-bit stack pointer on-chip peripherals 12-bit voltage output dac dual 16-bit ?? ?? ? dacs/pwms on-chip temperature sensor dual excitation current sources time interval counter (real time clock/wakeup cct) uart and spi ? serial i/o timer 3 for high speed uart baud rates (incl 115,200) watchdog timer (wdt), power supply monitor (psm) power specified for 3 v and 5 v operation normal: 3 ma @ 3 v (core clk = 1.5 mhz) power-down: 20 a max with wake-up cct running microconverter is a registered trademark of analog devices, inc. spi is a registered trademark of motorola inc. functional block diagram general description the ADUC834 is a complete smart transducer front-end, inte- grating two high-resolution sigma delta adcs, an 8-bit mcu, and program/data flash/ee memory on a single chip. the two independent adcs (primary and auxiliary) include a temperature sensor and a pga (allowing direct measurement of low-level signals). the adcs with on-chip digital filtering and programmable output data rates are intended for the measure- ment of wide dynamic range, low frequency signals, such as those in weigh scale, strain-gauge, pressure transducer, or temperature measurement applications. the device operates from a 32 khz crystal with an on-chip pll generating a high-frequency clock of 12.58 mhz. this clock is, routed through a programmable clock divider from which the mcu core clock operating frequency is generated. the micro- controller core is an 8052 and therefore 8051 instruction set compatible with 12 core clock periods per machine cycle. 62 kbytes of nonvolatile flash/ee program memory are provided on-chip. 4 kbytes of nonvolatile flash/ee data memory, 256 bytes ram and 2 kbytes of extended ram are also integrated on-chip. the program memory can be configured as data memory in datalogging applications. the ADUC834 also incorporates additional analog functionality with a 12-bit dac, dual current sources, power supply monitor, and a bandgap reference. on-chip digital peripherals include two 16-bit ? dacs/pwm, watchdog timer, real time clock (time interval counter), four timers/counters, and two serial i/o ports (uart and spi). on-chip factory firmware supports in-circuit serial download (via uart), as well as single-pin emulation mode via the ea pin. a functional block diagram of the ADUC834 is shown above with a more detailed block diagram shown in figure 11 (page 18). the part operates from a 3v or a 5v supply. when operating from 3v the power dissipation for the part is below 10mw. the ADUC834 is housed in a 52-lead mqfp package. applications intelligent sensors (ieee1451.2-compatible) weigh scales portable instrumentation pressure transducers 4?20 ma transmitters 62 kbytes flash/ee program memory 4 kbytes flash/ee data memory 2304 bytes user ram 3 16 bit timers 1 real time clock 4 parallel ports 8051-based mcu with additional peripherals power supply mon watchdog timer uart and spi serial i/o ADUC834 prog. clock divider xtal2 xtal1 buf agnd mux temp sensor refin+refin? external vref detect inte rnal bandgap vref ain1 ain2 ain3 ain4 ain5 auxiliary 16-bit ? adc primary 24-bit ? adc mux osc & pll avdd mux 16-bit pwm pga 16-bit ? dac 16-bit ? dac 16-bit pwm 12-bit dac buf dac current source avdd iexc1 iexc2 pwm0 pwm1
(12 march 2002) rev. p rc ADUC834 ?2? preliminary technical data overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 timing specifications . . . . . . . . . . . . . . . . . . . . . . . 8 absolute maximum ratings . . . . . . . . . . . . . . . . 17 ordering guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 pin function descriptions . . . . . . . . . . . . . . . . . 18 memory organization . . . . . . . . . . . . . . . . . . . . . . 21 special function registers (sfrs) . . . . . . . . . . 22 accumulator (acc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 b sfr (b) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 stack pointer (sp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 data pointer (dptr) . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 program status word (psw) . . . . . . . . . . . . . . . . . . . . . 23 power control (pcon) . . . . . . . . . . . . . . . . . . . . . . . . . 23 ADUC834 configuration sfr (cfg834) . . . . . . . . . . . . 23 complete sfr map . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 primary and auxiliary adcs . . . . . . . . . . . . . . . . 25 adcstat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 adcmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 adc0con . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 adc1con . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 adc0h/m/l / adc1h/l . . . . . . . . . . . . . . . . . . . . . . . . 28 of0h/m/l / of1h/l . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 gn0h/m/l / gn1h/l . . . . . . . . . . . . . . . . . . . . . . . . . . 28 sf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 primary and aux adc noise performance . . 30 primary and auxiliary adc description . . . 31 primary adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 auxiliary adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 analog input channels . . . . . . . . . . . . . . . . . . . . . . . . . . 33 primary and auxiliary adc inputs . . . . . . . . . . . . . . . . . 33 analog input ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 programmable gain amplifier . . . . . . . . . . . . . . . . . . . . . 33 bipolar/unipolar inputs . . . . . . . . . . . . . . . . . . . . . . . . . . 33 reference input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 burnout currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 excitation currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 reference detect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 sigma-delta modulator . . . . . . . . . . . . . . . . . . . . . . . . . . 34 digital filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 adc chopping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 nonvolatile flash/ee memory . . . . . . . . . . . . . 37 flash/ee memory overview . . . . . . . . . . . . . . . . . . . . . . 37 flash/ee memory and the ADUC834 . . . . . . . . . . . . . . . 37 ADUC834 flash/ee memory reliability . . . . . . . . . . . . . 37 using the flash/ee program memory . . . . . . 38 serial/parallel downloading . . . . . . . . . . . . . . . . . . . . . . . 38 user download mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 flash/ee program memory security . . . . . . . . . . . . . . . . 38 using the flash/ee data memory . . . . . . . . . . . 39 econ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 programming the flash/ee data memory . . . . . . . . . . . 40 flash/ee memory timing . . . . . . . . . . . . . . . . . . . . 40 dac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 daccon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 using the dac converter . . . . . . . . . . . . . . . . . . . . . . . . 41 pwm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 pwmcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 on-chip pll (pllcon) . . . . . . . . . . . . . . . . . . . . . . . . 46 time interval counter (timecon) . . . . . . . . . . 47 watchdog timer (wdcon) . . . . . . . . . . . . . . . . . . 49 power supply monitor (psmcon) . . . . . . . . . . . 50 serial peripheral interface . . . . . . . . . . . . . . . . 51 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 spicon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 using the spi interface . . . . . . . . . . . . . . . . . . . . . . . . . . 52 dual data pointer (dpcon) . . . . . . . . . . . . . . . . . 53 8051-compatible peripherals . . . . . . . . . . . . . . . . 54 parallel i/o ports 0?3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 additional high current digital output pins . . . . . . . . . 54 timers/counters . . . . . . . . . . . . . . . . . . . . . . . . . . 55 tmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 tcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 timer/counter 0/1 modes of operation . . . . . . . . . . . 57 timer 2 operating modes . . . . . . . . . . . . . . . . . . . . . . 58 t2con . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 uart serial interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 scon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 uart operating modes . . . . . . . . . . . . . . . . . . . . . . . 61 baud rate generation using timer 1 and timer 2 . . . 62 baud rate generation using timer 3 . . . . . . . . . . . . . 6 3 interrupt system . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 hardware design considerations . . . . . . . . . . 66 external memory interface . . . . . . . . . . . . . . . . . . . . . . . 66 power supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 power-on reset operation . . . . . . . . . . . . . . . . . . . . . . . 67 power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 power-saving modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 grounding and board layout recommendations . . . . . . 68 system self-identification . . . . . . . . . . . . . . . . . . . . . . . . 68 clock oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 other hardware considerations . . . . . . . . . . 69 in-circuit serial download access . . . . . . . . . . . . . . . . . 69 embedded serial port debugger . . . . . . . . . . . . . . . . . . . 69 single-pin emulation mode . . . . . . . . . . . . . . . . . . . . . . 69 enhanced-hooks emulation mode . . . . . . . . . . . . . . . . . 69 typical system configuration . . . . . . . . . . . . . . . . . . . . . 69 quickstart development system . . . . . . . . . . 71 outline dimensions . . . . . . . . . . . . . . . . . . . . . . . . 72 table of contents
rev. p rc (12 march 2002) ?3? ADUC834 preliminary technical data parameter ADUC834bs test conditions/comments unit adc specifications conversion rate 5.4 on both channels hz min 105 programmable in 0.732 ms increments hz max primary adc no missing codes 2 24 20 hz update rate bits min resolution 13 range = 20 mv, 20 hz update rate bits p-p typ 18 range = 2.56 v, 20 hz update rate bits p-p typ output noise see table x and xi output noise varies with selected in ADUC834 adc update rate and gain range description (pg 30) integral nonlinearity 15 1 lsb 16 ppm of fsr max offset error 3 3 v typ offset error drift 10 nv/c typ full-scale error 4 10 v typ gain error drift 5 0.5 ppm/c typ adc range matching 2 ain = 18 mv v typ power supply rejection (psr) 113 ain = 7.8 mv, range = 20 mv dbs typ 80 ain = 1 v, range = 2.56 v dbs min common-mode dc rejection on ain 95 at dc, ain = 7.8 mv, range = 20 mv dbs min on ain 113 at dc, ain = 1 v, range = 2.56 v dbs typ on refin 125 at dc, ain = 1 v, range = 2.56 v dbs typ common-mode 50 hz/60 hz rejection 2 20 hz update rate on ain 95 50 hz/60 hz 1 hz, ain = 7.8 mv, dbs min range = 20 mv 90 50 hz/60 hz 1 hz, ain = 1 v, dbs min range = 2.56 v on refin 90 50 hz/60 hz 1 hz, ain = 1 v, dbs min range = 2.56 v normal mode 50 hz/60 hz rejection 2 on ain 60 50 hz/60 hz 1 hz, 20 hz update rate dbs min on refin 60 50 hz/60 hz 1 hz, 20 hz update rate dbs min auxiliary adc no missing codes 2 16 bits min resolution 16 range = 2.5 v, 20 hz update rate bits p-p typ output noise see table xii in output noise varies with selected ADUC834 adc update rate description (pg 30) integral nonlinearity 15 ppm of fsr max offset error 3 ?2 lsb typ offset error drift 1 v/c typ full-scale error 6 ?2.5 lsb typ gain error drift 5 0.5 ppm/c typ power supply rejection (psr) 80 ain = 1 v, 20 hz update rate dbs min normal mode 50 hz/60 hz rejection 2 on ain 60 50 hz/60 hz 1 hz dbs min on refin 60 50 hz/60 hz 1 hz, 20 hz update rate dbs min dac performance dc specifications 7 resolution 12 bits relative accuracy 3 lsb typ differential nonlinearity ?1 guaranteed 12-bit monotonic lsb max offset error 50 mv max gain error 8 1 av dd range % max 1 v ref range % typ ac specifications 2, 7 voltage output settling time 15 settling time to 1 lsb of final value s typ digital-to-analog glitch energy 10 1 lsb change at major carry nvs typ (av dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v, dv dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v, refin(+) = 2.5 v, refin(?) = agnd; agnd = dgnd = 0 v; xtal1/xtal2 = 32.768 khz crystal; all specifications t min to t max unless otherwise noted.) specific a tions 1
(12 march 2002) rev. p rc ?4? ADUC834?pecific a tion s 1 preliminary technical data parameter ADUC834bs test conditions/comments unit internal reference adc reference reference voltage 1.25 1% initial tolerance @ 25c, v dd = 5 v v min/max power supply rejection 45 dbs typ reference tempco 100 ppm/c typ dac reference reference voltage 2.5 1% initial tolerance @ 25c, v dd = 5 v v min/max power supply rejection 50 dbs typ reference tempco 100 ppm/c typ analog inputs/reference inputs primary adc differential input voltage ranges 9, 10 external reference voltage = 2.5 v rn2, rn1, rn0 of adc0con set to bipolar mode (adc0con3 = 0) 20 0 0 0 (unipolar mode 0 to 20 mv) mv 40 0 0 1 (unipolar mode 0 to 40 mv) mv 80 0 1 0 (unipolar mode 0 to 80 mv) mv 160 0 1 1 (unipolar mode 0 to 160 mv) mv 320 1 0 0 (unipolar mode 0 to 320 mv) mv 640 1 0 1 (unipolar mode 0 to 640 mv) mv 1.28 1 1 0 (unipolar mode 0 to 1.28 v) v 2.56 1 1 1 (unipolar mode 0 to 2.56 v) v analog input current 2 1 na max analog input current drift 5 pa/c typ absolute ain voltage limits agnd + 100 mv v min av dd ? 100 mv v max auxiliary adc input voltage range 9, 10 0 to v ref unipolar mode, for bipolar mode v see note 11 average analog input current 125 input current will vary with input na/v typ average analog input current drift 2 2 voltage on the unbuffered auxiliary adc pa/v/c typ absolute ain voltage limits 11 agnd ? 30 mv v min av dd + 30 mv v max external reference inputs refin(+) to refin(?) range 2 1v min av dd v max average reference input current 1 both adcs enabled a/v typ average reference input current drift 0.1 na/v/c typ ?no ext. ref? trigger voltage 0.3 noxref bit active if v ref < 0.3 v v min 0.65 noxref bit inactive if v ref > 0.65 v v max adc system calibration full-scale calibration limit +1.05 fs v max zero-scale calibration limit ?1.05 fs v min input span 0.8 fs v min 2.1 fs v max analog (dac) outputs voltage range 0 to v ref dacrn = 0 in daccon sfr v typ 0 to av dd dacrn = 1 in daccon sfr v typ resistive load 10 from dac output to agnd ? typ capacitive load 100 from dac output to agnd pf typ output impedance 0.5 ? typ i sink 50 a typ temperature sensor accuracy 2 c typ thermal impedance ( ja ) 90 c/ ? typ
rev. p rc (12 march 2002) ?5? ADUC834 preliminary technical data parameter ADUC834bs test conditions/comments unit transducer burnout current sources ain+ current ?100 ain+ is the selected positive input to na typ the primary adc ain? current +100 ain? is the selected negative input to na typ the auxiliary adc initial tolerance @ 25c 10 % typ drift 0.03 %/c typ excitation current sources output current ?200 available from each current source a typ initial tolerance @ 25c 10 % typ drift 200 ppm/c typ initial current matching @ 25c 1 matching between both current sources % typ drift matching 20 ppm/c typ line regulation (av dd )1 av dd = 5 v + 5% a/v typ load regulation 0.1 a/v typ output compliance av dd ? 0.6 v max agnd min logic inputs all inputs except sclock, reset, and xtal1 v inl , input low voltage 0.8 dv dd = 5 v v max 0.4 dv dd = 3 v v max v inh , input high voltage 2.0 v min sclock and reset only (schmitt-triggered inputs) 2 v t+ 1.3/3 dv dd = 5 v v min/v max 0.95/2.5 dv dd = 3 v v min/v max v t? 0.8/1.4 dv dd = 5 v v min/v max 0.4/1.1 dv dd = 3 v v min/v max v t+ ? v t? 0.3/0.85 dv dd = 5 v v min/v max 0.3/0.85 dv dd = 3 v v min/v max input currents port 0, p1.2?p1.7, ea 10 v in = 0 v or v dd a max sclock, mosi, miso, ss 12 ?10 min, ?40 max v in = 0 v, dv dd = 5 v, internal pull-up a min/a max 10 v in = v dd , dv dd = 5 v a max reset 10 v in = 0 v, dv dd = 5 v a max 35 min, 105 max v in = v dd , dv dd = 5 v, a min/a max internal pull-down p1.0, p1.1, ports 2 and 3 10 v in = v dd , dv dd = 5 v a max ?180 v in = 2 v, dv dd = 5 v a min ?660 a max ?20 v in = 450 mv, dv dd = 5 v a min ?75 a max input capacitance 5 all digital inputs pf typ crystal oscillator (xtal1 and xtal2) logic inputs, xtal1 only v inl , input low voltage 0.8 dv dd = 5 v v max 0.4 dv dd = 3 v v max v inh , input high voltage 3.5 dv dd = 5 v v min 2.5 dv dd = 3 v v min xtal1 input capacitance 18 pf typ xtal2 output capacitance 18 pf typ
(12 march 2002) rev. p rc ?6? ADUC834?pecific a tion s 1 preliminary technical data parameter ADUC834bs test conditions/comments unit logic outputs (not including xtal2) 2 v oh , output high voltage 2.4 v dd = 5 v, i source = 80 a v min 2.4 v dd = 3 v, i source = 20 a v min v ol , output low voltage 13 0.4 i sink = 8 ma, sclock/d0, v max mosi/d1 0.4 i sink = 10 ma, p1.0 and p1.1 v max 0.4 i sink = 1.6 ma, all other outputs v max floating state leakage current 10 a max floating state output capacitance 5 pf typ power supply monitor (psm) av dd trip point selection range 2.63 four trip points selectable in this range v min 4.63 programmed via tpa1?0 in psmcon v max av dd power supply trip point accuracy 3.5 % max dv dd trip point selection range 2.63 four trip points selectable in this range v min 4.63 programmed via tpd1?0 in psmcon v max dv dd power supply trip point accuracy 3.5 % max watchdog timer (wdt) timeout period 0 nine timeout periods in this range ms min 2000 programmed via pre3?0 in wdcon ms max mcu core clock rate clock rate generated via on-chip pll mcu clock rate 2 98.3 programmable via cd2?0 bits in khz min pllcon sfr 12.58 mhz max start-up time at power-on 300 ms typ from idle mode 1 ms typ from power-down mode oscillator running osc_pd bit = 0 in pllcon sfr wakeup with int0 interrupt 1 ms typ wakeup with spi interrupt 1 ms typ wakeup with tic interrupt 1 ms typ wakeup with external reset 3.4 ms typ oscillator powered down osc_pd bit = 1 in pllcon sfr wakeup with external reset 0.9 sec typ after external reset in normal mode 3.3 ms typ after wdt reset in normal mode 3.3 controlled via wdcon sfr ms typ flash/ee memory reliability characteristics 14 endurance 15 100,000 cycles min data retention 16 100 years min power requirements dv dd and av dd can be set independently power supply voltages av dd , 3 v nominal operation 2.7 v min 3.6 v max av dd , 5 v nominal operation 4.75 v min 5.25 v max dv dd , 3 v nominal operation 2.7 v min 3.6 v max dv dd , 5 v nominal operation 4.75 v min 5.25 v max
rev. p rc (12 march 2002) ?7? ADUC834 preliminary technical data parameter ADUC834bs test conditions/comments unit power requirements (continued) power supply currents normal mode 17, 18 dv dd current 4 dv dd = 4.75 v to 5.25 v, core clk = 1.57 mhz ma max 2.1 dv dd = 2.7 v to 3.6 v, core clk = 1.57 mhz ma max av dd current 170 av dd = 5.25 v, core clk = 1.57 mhz a max dv dd current 15 dv dd = 4.75 v to 5.25 v, core clk = 12.58 mhz ma max 8dv dd = 2.7 v to 3.6 v, core clk = 12.58 mhz ma max av dd current 170 av dd = 5.25 v, core clk = 12.58 mhz a max power supply currents idle mode 17, 18 dv dd current 1.2 dv dd = 4.75 v to 5.25 v, core clk = 1.57 mhz ma max 750 dv dd = 2.7 v to 3.6 v, core clk = 1.57 mhz a typ av dd current 140 measured @ av dd = 5.25 v, core clk = 1.57 mhz a typ dv dd current 2 dv dd = 4.75 v to 5.25 v, core clk = 12.58 mhz ma typ 1dv dd = 2.7 v to 3.6 v, core clk = 12.58 mhz ma typ av dd current 140 measured at av dd = 5.25 v, core clk = 12.58 mhz a typ power supply currents power-down mode 17, 18 core clk = 1.57 mhz or 12.58 mhz dv dd current 50 dv dd = 4.75 v to 5.25 v, osc. on, tic on a max 20 dv dd = 2.7 v to 3.6 v, osc. on, tic on a max av dd current 1 measured at av dd = 5.25 v, osc. on or osc. off a max dv dd current 20 dv dd = 4.75 v to 5.25 v, osc. off a max 5dv dd = 2.7 v to 3.6 v, osc. off a typ typical additional power supply currents core clk = 1.57 mhz, av dd = dv dd = 5 v (ai dd and di dd ) psm peripheral 50 a typ primary adc 1 ma typ auxiliary adc 500 a typ dac 150 a typ dual current sources 400 a typ notes 1 temperature range ?40c to +85c. 2 these numbers are not production tested but are guaranteed by design and/or characterization data on production release. 3 system zero-scale calibration can remove this error. 4 the primary adc is factory calibrated at 25c with av dd = dv dd = 5 v yielding this full-scale error of 10 v. if user power supply or temperature conditions are significantly different than these, an internal full-scale calibration will restore this error to 10 v. a system zero-scale and full-scale calibration will remove this error altogether. 5 gain error drift is a span drift. to calculate full-scale error drift, add the offset error drift to the gain error drift times the full-scale input. 6 the auxiliary adc is factory calibrated at 25c with av dd = dv dd = 5 v yielding this full-scale error of ?2.5 lsb. a system zero-scale and full-scale calibration will remove this error altogether. 7 dac linearity and ac specifications are calculated using: reduced code range of 48 to 4095, 0 to v ref , reduced code range of 48 to 3995, 0 to v dd . 8 gain error is a measure of the span error of the dac. 9 in general terms, the bipolar input voltage range to the primary adc is given by range adc = (v ref 2 rn )/125, where: v ref = refin(+) to refin(?) voltage and v ref = 1.25 v when internal adc v ref is selected. rn = decimal equivalent of rn2, rn1, rn0, e.g., v ref = 2.5 v and rn2, rn1, rn0 = 1, 1, 0 the range adc = 1.28 v. in unipolar mode the effective range is 0 v to 1.28 v in our example. 10 1.25 v is used as the reference voltage to the adc when internal v ref is selected via xref0 and xref1 bits in adc0con and adc1con respectively. 11 in bipolar mode, the auxiliary adc can only be driven to a minimum of a gnd ? 30 mv as indicated by the auxiliary adc absolute ain voltage limits. the bipolar range is still ?v ref to +v ref ; however, the negative voltage is limited to ?30 mv. 12 pins configured in spi mode, pins configured as digital inputs during this test. 13 pins configured in high current output mode only. 14 flash/ee memory reliability characteristics apply to both the flash/ee program memory and flash/ee data memory. 15 endurance is qualified to 100 kcycles as per jedec std. 22 method a117 and measured at ?40c, +25c and +85c, typical endurance at 25c is 700 kcycles. 16 retention lifetime equivalent at junction temperature (t j ) = 55c as per jedec std. 22, method a117. retention lifetime based on an activation energy of 0.6ev will derate with junction temperature as shown in figure 27 in the flash/ee memory description section of this data sheet . 17 power supply current consumption is measured in normal, idle, and power-down modes under the following conditions: normal mode: reset = 0.4 v, digital i/o pins = open circuit, core clk changed via cd bits in pllcon, core executing internal software loop. idle mode: reset = 0.4 v, digital i/o pins = open circuit, core clk changed via cd bits in pllcon, pcon.0 = 1, core execution suspended in idle mode. power-down mode: reset = 0.4 v, all p0 pins and p1.2?p1.7 pins = 0.4 v, all other digital i/o pins are open circuit, core clk changed via cd bits in pllcon, pcon.1 = 1, core execution suspended in power-down mode, osc turned on or off via osc_pd bit (pllcon.7) in pllcon sfr. 18 dv dd power supply current will increase typically by 3 ma (3 v operation) and 10 ma (5 v operation) during a flash/ee memory program or erase cycle. specifications subject to change without notice
(12 march 2002) rev. p rc ADUC834 ?8? preliminary technical data timing specifications 1, 2, 3 (av dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v, dv dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v; all specifications t min to t max unless otherwise noted.) 32.768 khz external crystal parameter min typ max unit figure clock input (external clock driven xtal1) t ck xtal1 period 30.52 s 1 t ckl xtal1 width low 15.16 s 1 t ckh xtal1 width high 15.16 s 1 t ckr xtal1 rise time 20 ns 1 t ckf xtal1 fall time 20 ns 1 1/t core ADUC834 core clock frequency 4 0.098 12.58 mhz t core ADUC834 core clock period 5 0.636 s t cyc ADUC834 machine cycle time 6 0.95 7.6 122.45 s notes 1 ac inputs during testing are driven at dv dd ? 0.5 v for a logic 1, and 0.45 v for a logic 0. timing measurements are made at v ih min for a logic 1, and v il max for a logic 0 as shown in figure 2. 2 for timing purposes, a port pin is no longer floating when a 100 mv change from load voltage occurs. a port pin begins to float when a 100 mv change from the loaded v oh /v ol level occurs as shown in figure 2. 3 c load for port0, ale, psen outputs = 100 pf; c load for all other outputs = 80 pf unless otherwise noted. 4 ADUC834 internal pll locks onto a multiple (384 times) the external crystal frequency of 32.768 khz to provide a stable 12.583 m hz internal clock for the system. the core can operate at this frequency or at a binary submultiple called core_clk, selected via the pllcon sfr. 5 this number is measured at the default core_clk operating frequency of 1.57 mhz. 6 ADUC834 machine cycle time is nominally defined as 12/core_clk. t chk t ckl t ck t ckf t ckr figure 1. xtal1 input dv dd ? 0.5v 0.45v 0.2dv dd + 0.9v test points 0.2dv dd ? 0.1v v load ? 0.1v v load v load + 0.1v timing reference points v load ? 0.1v v load v load + 0.1v figure 2. timing waveform characteristics
rev. p rc (12 march 2002) ADUC834 ? 9 ? preliminary technical data 12.58 mhz core_clk variable core_clk parameter min max min max unit figure external program memory t lhll ale pulsewidth 119 2t core ? 40 ns 3 t avll address valid to ale low 39 t core ? 40 ns 3 t llax address hold after ale low 49 t core ? 30 ns 3 t lliv ale low to valid instruction in 218 4t core ? 100 ns 3 t llpl ale low to psen low 49 t core ? 30 ns 3 t plph psen pulsewidth 193 3t core ? 45 ns 3 t pliv psen low to valid instruction in 133 3t core ? 105 ns 3 t pxix input instruction hold after psen 00 ns3 t pxiz input instruction float after psen 54 t core ? 25 ns 3 t aviv address to valid instruction in 292 5t core ? 105 ns 3 t plaz psen low to address float 25 25 ns 3 t phax address hold after psen high 0 0 ns 3 t lhll t avll pcl (out) instruction (in) pch core_clk ale (o) psen (o) port 0 (i/o) port 2 (o) t llpl t llax t plaz t pxix t pxiz t pliv t lliv t plph t phax t aviv figure 3. external program memory read cycle
(12 march 2002) rev. p rc ADUC834 ? 10 ? preliminary technical data 12.58 mhz core_clk variable core_clk parameter min max min max unit figure external data memory read cycle t rlrh rd pulsewidth 377 6t core ? 100 ns 4 t avll address valid after ale low 39 t core ? 40 ns 4 t llax address hold after ale low 44 t core ? 35 ns 4 t rldv rd low to valid data in 232 5t core ? 165 ns 4 t rhdx data and address hold after rd 00 ns4 t rhdz data float after rd 89 2t core ? 70 ns 4 t lldv ale low to valid data in 486 8t core ? 150 ns 4 t avdv address to valid data in 550 9t core ? 165 ns 4 t llwl ale low to rd low 188 288 3t core ? 50 3t core + 50 ns 4 t avwl address valid to rd low 188 4t core ? 130 ns 4 t rlaz rd low to address float 0 0 ns 4 t whlh rd high to ale high 39 119 t core ? 40 t core + 40 ns 4 t llax data (in) core_clk ale (o) psen (o) port 0 (i/o) port 2 (o) rd (o) t lldv t llwl t avwl t avll t avdv t rlaz t rldv t rhdx t rhdz t whlh a0 ? a7 (out) a16 ? a23 a8 ? a15 t rlrh figure 4. external data memory read cycle
rev. p rc (12 march 2002) ADUC834 ? 11 ? preliminary technical data 12.58 mhz core_clk variable core_clk parameter min max min max unit figure external data memory write cycle t wlwh wr pulsewidth 377 6t core ? 100 ns 5 t avll address valid after ale low 39 t core ? 40 ns 5 t llax address hold after ale low 44 t core ? 35 ns 5 t llwl ale low to wr low 188 288 3t core ? 50 3t core + 50 ns 5 t avwl address valid to wr low 188 4t core ? 130 ns 5 t qvwx data valid to wr transition 29 t core ? 50 ns 5 t qvwh data setup before wr 406 7t core ? 150 ns 5 t whqx data and address hold after wr 29 t core ? 50 ns 5 t whlh wr high to ale high 39 119 t core ? 40 t core + 40 ns 5 t llax a0 ? a7 core_clk ale (o) psen (o) port 0 (o) port 2 (o) wr (o) t whlh t whqx t wlwh t qvwx t qvwh t llwl t avwl t avll a16 ? a23 a8 ? a15 data figure 5. external data memory write cycle
(12 march 2002) rev. p rc ADUC834 ? 12 ? preliminary technical data 12.58 mhz core_clk variable core_clk parameter min typ max min typ max unit figure uart timing (shift register mode) t xlxl serial port clock cycle time 0.95 12t core s 6 t qvxh output data setup to clock 662 10t core ? 133 ns 6 t dvxh input data setup to clock 292 2t core + 133 ns 6 t xhdx input data hold after clock 0 0 ns 6 t xhqx output data hold after clock 42 2t core ? 117 ns 6 set ri or set ti 01 bit 1 t xlxl ale (o) txd (output clock) rxd (output data) rxd (input data) 67 bit 6 msb msb bit 6 bit 1 lsb t xhqx t qvxh t dvxh t xhdx figure 6. uart timing in shift register mode
rev. p rc (12 march 2002) ADUC834 ? 13 ? preliminary technical data parameter min typ max unit figure spi master mode timing (cpha = 1) t sl sclock low pulsewidth * 630 ns 7 t sh sclock high pulsewidth * 630 ns 7 t dav data output valid after sclock edge 50 ns 7 t dsu data input setup time before sclock edge 100 ns 7 t dhd data input hold time after sclock edge 100 ns 7 t df data output fall time 10 25 ns 7 t dr data output rise time 10 25 ns 7 t sr sclock rise time 10 25 ns 7 t sf sclock fall time 10 25 ns 7 note * characterized under the following conditions: a. core clock divider bits cd2, cd1, and cd0 bits in pllcon sfr set to 0, 1, and 1 respectively, i.e., core clock frequency = 1. 57 mhz and b. spi bit-rate selection bits spr1 and spr0 bits in spicon sfr set to 0 and 0 respectively. sclock (cpol = 0) t sh sclock (cpol = 1) mosi miso msb in bits 6 ? 1 bits 6 ? 1 lsb in lsb msb t sl t dav t df t dr t sr t sf t dhd t dsu figure 7. spi master mode timing (cpha = 1)
(12 march 2002) rev. p rc ADUC834 ? 14 ? preliminary technical data parameter min typ max unit figure spi master mode timing (cpha = 0) t sl sclock low pulsewidth * 630 ns 8 t sh sclock high pulsewidth * 630 ns 8 t dav data output valid after sclock edge 50 ns 8 t dosu data output setup before sclock edge 150 ns 8 t dsu data input setup time before sclock edge 100 ns 8 t dhd data input hold time after sclock edge 100 ns 8 t df data output fall time 10 25 ns 8 t dr data output rise time 10 25 ns 8 t sr sclock rise time 10 25 ns 8 t sf sclock fall time 10 25 ns 8 note * characterized under the following conditions: a. core clock divider bits cd2, cd1 and cd0 bits in pllcon sfr set to 0, 1, and 1 respectively, i.e., core clock frequency = 1.5 7 mhz and b. spi bit-rate selection bits spr1 and spr0 bits in spicon sfr set to 0 and 0 respectively. sclock (cpol = 0) t dsu sclock (cpol = 1) mosi miso msb lsb lsb in bits 6 ? 1 bits 6 ? 1 msb in t dhd t dr t dav t df t dosu t sh t sl t sr t sf figure 8. spi master mode timing (cpha = 0)
rev. p rc (12 march 2002) ADUC834 ? 15 ? preliminary technical data parameter min typ max unit figure spi slave mode timing (cpha = 1) t ss ss to sclock edge 0 ns 9 t sl sclock low pulsewidth 330 ns 9 t sh sclock high pulsewidth 330 ns 9 t dav data output valid after sclock edge 50 ns 9 t dsu data input setup time before sclock edge 100 ns 9 t dhd data input hold time after sclock edge 100 ns 9 t df data output fall time 10 25 ns 9 t dr data output rise time 10 25 ns 9 t sr sclock rise time 10 25 ns 9 t sf sclock fall time 10 25 ns 9 t sfs ss high after sclock edge 0 ns 9 sclock (cpol = 0) t ss sclock (cpol = 1) miso mosi ss msb in bits 6 ? 1lsb in lsb bits 6 ? 1 msb t dhd t dsu t df t dr t sl t sh t dav t df t sr t sf t sfs figure 9. spi slave mode timing (cpha = 1)
(12 march 2002) rev. p rc ADUC834 ? 16 ? preliminary technical data parameter min typ max unit figure spi slave mode timing (cpha = 0) t ss ss to sclock edge 0 ns 10 t sl sclock low pulsewidth 330 ns 10 t sh sclock high pulsewidth 330 ns 10 t dav data output valid after sclock edge 50 ns 10 t dsu data input setup time before sclock edge 100 ns 10 t dhd data input hold time after sclock edge 100 ns 10 t df data output fall time 10 25 ns 10 t dr data output rise time 10 25 ns 10 t sr sclock rise time 10 25 ns 10 t sf sclock fall time 10 25 ns 10 t ssr ss to sclock edge 50 ns 10 t doss data output valid after ss edge 20 ns 10 t sfs ss high after sclock edge 0 ns 10 miso mosi sclock (cpol = 1) sclock (cpol = 0) ss msb bits 6 ? 1 lsb bits 6 ? 1 lsb in msb in t dhd t dsu t dr t df t dav t doss t sh t sl t ss t sr t sf t sfs figure 10. spi slave mode timing (cpha = 0)
rev. p rc (12 march 2002) ADUC834 ? 17 ? preliminary technical data caution esd (electrostatic discharge) sensitive device. electrostatic charges as high as 4000 v readily accumulate on the human body and test equipment and can discharge without detection. although the aduc8 34 features proprietary esd protection circuitry, permanent damage may occur on devices subjected to high-energy electrostatic discharges. therefore, proper esd precautions are recommended to avoid performance degradation or loss of functionality. absolute maximum ratings 1 (t a = 25c unless otherwise noted) av dd to agnd . . . . . . . . . . . . . . . . . . . . . . ?0.3 v to +7 v av dd to dgnd . . . . . . . . . . . . . . . . . . . . . . ?0.3 v to +7 v dv dd to agnd . . . . . . . . . . . . . . . . . . . . . . ?0.3 v to +7 v dv dd to dgnd . . . . . . . . . . . . . . . . . . . . . . ?0.3 v to +7 v agnd to dgnd 2 . . . . . . . . . . . . . . . . . . . ?0.3 v to +0.3 v av dd to dv dd . . . . . . . . . . . . . . . . . . . . . . . . . ?2 v to +5 v analog input voltage to agnd 3 . . . ?0.3 v to av dd +0.3 v reference input voltage to agnd . . ?0.3 v to av dd +0.3 v ain/refin current (indefinite) . . . . . . . . . . . . . . . . 30 ma digital input voltage to dgnd . . . . ?0.3 v to dv dd +0.3 v digital output voltage to dgnd . . . ?0.3 v to dv dd +0.3 v operating temperature range . . . . . . . . . . ?40c to +85c storage temperature range . . . . . . . . . . . ?65c to +150c junction temperature . . . . . . . . . . . . . . . . . . . . . . . . . 150c ja thermal impedance . . . . . . . . . . . . . . . . . . . . . 53.2c/w lead temperature, soldering vapor phase (60 sec) . . . . . . . . . . . . . . . . . . . . . . . . 215c infrared (15 sec) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220c 1 stresses above those listed under absolute maximum ratings may cause perma- nent damage to the device. this is a stress rating only; functional operation of the device at these or any other conditions above those listed in the operational sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. 2 agnd and dgnd are shorted internally on the ADUC834. 3 applies to p1.2 to p1.7 pins operating in analog or digital input modes. pin configuration 52-lead mqfp ordering guide model temperature package package range description option ADUC834bs ?40c to +85c 52-lead plastic quad flatpack s-52 quickstart development system description model eval-ADUC834qs development system for the ADUC834 microconverter, containing: evaluation board serial port cable windows ? serial downloader (wsd) windows debugger/emulator (with c source debug) windows ADUC834 simulator (adsim) windows adc analysis software program (wasp) 8051 assembler (metalink) example code documentation windows is a registered trademark of microsoft corporation.
(12 march 2002) rev. p rc ADUC834 ? 18 ? preliminary technical data pin no. mnemonic type * description 1, 2 p1.0/p1.1 i/o p1.0 and p1.1 can function as a digital inputs or digital outputs and have a pull-up configu ration as described below for port 3. p1.0 and p1.1 have an increased current drive sink capa bility of 10 ma. p1.0/t2/pwm0 i/o p1.0 and p1.1 also have various secondary functions as described below. p1.0 can also be used to provide a clock input to timer 2. when enabled, counter 2 is incremented in response to a negative transition on the t2 input pin. if the pwm is enabled then the pwm0 output will appear at this pin. p1.1/t2ex/pwm1 i/o p1.1 can also be used to provide a control input to timer 2. when enabled, a negative transition on the t2ex input pin will cause a timer 2 capture or reload event. if the pwm is enabled then the pwm1 output will appear at this pin. ADUC834 detailed block diagram figure 11. ADUC834 detailed block diagram ADUC834 pin by pin function description prog. clock divider watchdog timer 256 bytes user ram power supply monitor ain3 ain4 ain5 ain1 ain2 refin    refin    iexc 2 iexc 1 ain mux temp sensor ain mux bandgap reference v ref detect current source mux 200    a 200    a 5 av dd 6 ag n d 20 dv dd dv dd 21 dg n d 35 dg n d 26 sc l o c k /d 0 27 mo s i / d1 14 mi s o 13 ss xt a l 1 buf ADUC834 auxiliary adc 16-bit    adc adc control and calibration pga primary adc 24-bit    adc adc control and calibration 3 22 t0 23 t1 2 t2ex t2 1 18 int0 19 int1 dac 40 ea 41 pse n 17 tx d 16 rx d 4 kbytes data flash/ee 62 kbytes program flash/ee including user download mode uart serial port 8052 mcu core downloader debugger dac control buf si n g l e - p i n e m ul at o r spi serial interface 16-bit counter timers time interval counter (wakeup cct) xt a l 2 33 osc 43 p 0 .0 ( a d 0) 44 p 0 .1 ( a d 1) 45 p 0 .2 ( a d 2) 46 p0 . 3 ( a d 3) 49 p 0 .4 ( a d 4) 50 p 0 .5 ( a d 5) 51 p 0 .6 ( a d 6) 52 p 0 .7 ( a d 7) 1 p 1 .0 ( t 2 ) 2 p1 . 1 ( t 2 ex) 3 p1 . 2 ( d a c / i ex c 1 ) 4 9 p 1 .4 ( a i n 1 ) 10 p 1 .5 ( a i n 2 ) 11 p 1 .6 ( a i n 3 ) 12 p1 . 7 ( ai n 4/ da c ) 28 p 2 .0 ( a 8 / a 1 6 ) 29 p 2 .1 ( a 9 / a17) 30 p 2 .2 ( a 1 0 / a 1 8 ) 31 p 2 .3 ( a 1 1/ a19 ) 36 p 2 .4 ( a 1 2 / a 2 0 ) 37 p 2 .5 ( a 1 3 / a 2 1 ) 38 p 2 .6 ( a 1 4 / a 2 2 ) 39 p2 . 7 ( a 1 5 / a 2 3 ) 16 p3 . 0 ( r xd ) 17 p3 . 1 ( t xd ) 18 p 3 .2 ( in t 0 ) 19 p 3 .3 ( in t 1 ) 22 p 3 .4 ( t 0 ) 23 p3 . 5 ( t 1 ) 24 p 3 .6 ( wr ) 25 p 3 .7 ( rd ) 12-bit voltage output dac p1 . 3 ( a i n 5 / i exc 2 ) 2 kbytes user xram pll 2 x data pointers 11-bit stack pointer mux 16-bit sd dac pwm0 pwm1 16-bit pwm 16-bit pwm pwm control 1 2 16-bit sd dac 32 42 al e por 15 r eset 48 dv dd 34 47 dg n d uart timer * shaded areas represent the new features of the ADUC834 over the aduc824
rev. p rc (12 march 2002) ADUC834 ? 19 ? preliminary technical data pin no. mnemonic type * description 3-4, 9-12 p1.2-p1.7 i port 1.2 to port 1.7 have no digital output driver; they can function as a digital input for w hich ?0? must be written to the port bit. as a digital input, these pins must be driven high or low externally. these pins also have the following analog functionality: p1.2/dac/iexc1 i/o the voltage output from the dac or one or both current sources (200 a or 2 x 200 a) can be configured to appear at this pin. p1.3/ain5/iexc2 i/o auxiliary adc input or one or both current sources can be configured at this pin. p1.4/ain1 i primary adc, positive analog input p1.5/ain2 i primary adc, negative analog input p1.6/ain3 i auxiliary adc input or muxed primary adc, positive analog input p1.7/ain4/dac i/o auxiliary adc input or muxed primary adc, negative analog input. the voltage output from the dac can also be configured to appear at this pin. 5av dd s analog supply voltage, 3 v or 5 v 6 agnd s analog ground. ground reference pin for the analog circuitry. 7 refin(?) i reference input, negative terminal. 8 refin(+) i reference input, positive terminal. 13 ss i slave select input for the spi interface. a weak pull-up is present on this pin. 14 miso i/o master input/slave output for the spi interface. there is a weak pull-up on this input pin. 15 reset i reset input. a high level on this pin for 16 core clock cycles while the oscillator is running resets the device. there is an internal weak pull-down and a schmitt trigger input stage on this pin. 16?19, p3.0?p3.7 i/o p3.0?p3.7 are bidirectional port pins with internal pull-up resistors. port 3 pins 22-25 that have 1s written to them are pulled high by the internal pull-up resistors, and in that state can be used as inputs. as inputs, port 3 pins being pulled externally low will source current because of the internal pull-up resistors. when driving a 0-to-1 out put transition, a strong pull-up is active for two core clock periods of the instruction cycle. port 3 pins also have various secondary functions described below. p3.0/rxd i/o receiver data for uart serial port p3.1/txd i/o transmitter data for uart serial port p3.2/ int0 i/o external interrupt 0. this pin can also be used as a gate control input to timer0. p3.3/ int1 i/o external interrupt 1. this pin can also be used as a gate control input to timer1. p3.4/t0 i/o timer/counter 0 external input p3.5/t1 i/o timer/counter 1 external input p3.6/ wr i/o external data memory write strobe. latches the data byte from port 0 into an external data memory. p3.7/ rd i/o external data memory read strobe. enables the data from an external data memory to port 0. 20, 34, 48 dv dd s digital supply, 3 v or 5 v. 21, 35, 47 dgnd s digital ground, ground reference point for the digital circuitry. 26 sclock/d0 i/o serial interface clock for the spi interface. as an input this pin is a schmitt triggered input and a weak internal pull-up is present on this pin unless it is outputting logic low. this pin can also be controlled directly in software as a digital output pin. 27 mosi/d1 i/o serial master output/slave input data for the spi interface. a weak internal pull-up is present on this pin unless it is outputting logic low. this pin can also be controlled directly in software as a digital output pin.
(12 march 2002) rev. p rc ADUC834 ? 20 ? preliminary technical data pin no. mnemonic type * description 28?31 p2.0?p2.7 i/o port 2 is a bidirectional port with internal pull-up resistors. port 2 pins that have 1s 36-39 (a8?a15) written to them are pulled high by the internal pull-up resistors, and in that state can (a16?a23) be used as inputs. as inputs, port 2 pins being pulled externally low will source current because of the internal pull-up resistors. port 2 emits the high order address bytes during fetches from external program memory and middle and high order address bytes during accesses to the 24-bit external data memory space. 32 xtal1 i input to the crystal oscillator inverter. 33 xtal2 o output from the crystal oscillator inverter. (see page 68 for description) 40 ea i/o external access enable, logic input. when held high, this input enables the device to fetch code from internal program memory locations 0000h to f800h. when held low this input enables the device to fetch all instructions from external program memory. to determine the mode of code execution, i.e., internal or external, the ea pin is sampled at the end of an external reset assertion or as part of a device power cycle. ea may also be used as an external emulation i/o pin and therefore the voltage level at this pin must not be changed during normal mode operation as it may cause an emulation interrupt that will halt code execution. 41 psen o program store enable, logic output. this output is a control signal that enables the external program memory to the bus during external fetch operations. it is active every six oscillator periods except during external data memory accesses. this pin remains high during internal program execution. psen can also be used to enable serial download mode when pulled low through a resistor at the end of an external reset assertion or as part of a device power cycle. 42 ale o address latch enable, logic output. this output is used to latch the low byte (and page byte for 24 -bit data address space accesses) of the address to external memory during external code or data memory access cycles. it is activated every six oscillator periods except during an external data memory access. it can be disabled by setting the pcon.4 bit in the pcon sfr. 43?46 p0.0?p0.7 i/o p0.0?p0.7, these pins are part of port0 which is an 8-bit open-drain bidirectional 49?52 (ad0?ad3) i/o port. port 0 pins that have 1s written to them float and in that state can be used (ad4?ad7) as high impedance inputs. an external pull-up resistor will be required on p0 outputs to force a valid logic high level externally. port 0 is also the multiplexed low-order address and data bus during accesses to external program or data memory. in this application it uses strong internal pull-ups when emitting 1s. *i = input, o = output, s = supply. notes 1. in the following descriptions, set implies a logic 1 state and cleared implies a logic 0 state unless otherwise stated. 2. in the following descriptions, set and cleared also imply that the bit is set or automatically cleared by the ADUC834 hardware unless otherwise stated. 3. user software should not write 1s to reserved or unimplemented bits as they may be used in future products.
rev. p rc (12 march 2002) ADUC834 ? 21 ? preliminary technical data memory organization the ADUC834 contains 4 different memory blocks namely: - 62kbytes of on-chip flash/ee program memory - 4kbytes of on-chip flash/ee data memory - 256 bytes of general purpose ram - 2kbytes of internal xram (1) flash/ee program memory the ADUC834 provides 62kbytes of flash/ee program memory to run user code. the user can choose to run code from this internal memory or run code from an external pro- gram memory. if the user applies power or resets the device while the ea pin is pulled low, the part will execute code from the external pro- gram space, otherwise the part defaults to code execution from its internal 62kbytes of flash/ee program memory. un- like the aduc824, where code execution can overflow from the internal code space to external code space once the pc be- comes greater than 1fffh, the ADUC834 does not support the rollover from f7ffh in internal code space to f800h in exter- nal code space. instead the 2048 bytes between f800h and ffffh will appear as nop instructions to user code. this internal code s pace can be downloaded via the uart serial port while the device is in-circuit. 56kbytes of the program memory can be repogrammed during runtime hence the code space can be upgraded in the field using a user defined protocol or it can be used as a data memory. this will be discussed in more detail in the flash/ee memory section of the datasheet. (2) flash/ee data memory 4kbytes of flash/ee data memory are available to the user and can be accessed indirectly via a group of control registers mapped into the special function register (sfr) area. access to the flash/ee data memory is discussed in detail later as part of the flash/ee memory section in this data sheet. (3) general purpose ram the general purpose ram is divided into two seperate memo- ries, namely the upper and the lower 128 bytes of ram. the lower 128 bytes of ram can be accessed through direct or indirect addressing wh ile the upper 128 bytes of ram can only be accessed through indirect addressing as it shares the same address space as the sfr space which can only be ac- cessed through direct addressing. the lower 128 bytes of internal data memory are mapped as shown in figure 12. the lowest 32 bytes are grouped into four banks of eight registers addressed as r0 through r7. the next 16 bytes (128 bits), locations 20hex through 2fhex above the register banks, form a block of directly addressable bit locations at bit addresses 00h through 7fh. the stack can be located anywhere in the internal memory address space, and the stack depth can be expanded up to 2048 bytes. reset initializes the stack pointer to location 07 hex and incre- ments it once before loading the stack to start from locations 08 hex which is also the first regis ter (r0) of register bank 1. thus, if one is going to use more than one register bank, the stack pointer should be initialized to an area of ram not used for data storage. bit-addressable (bit addresses) four banks of eight registers r0 r7 banks selected via bits in psw 11 10 01 00 07h 0fh 17h 1fh 2fh 7fh 00h 08h 10h 18h 20h reset value of stack pointer 30h general-purpose area figure 12. lower 128 bytes of internal data memory the ADUC834 contains 2048 bytes of internal xram, 1792 bytes of which can be configured to be used as an extended 11- bit stack pointer. by default the stack will operate exactly like an 8052 in that it will rollover from ffh to 00h in the general purpose ram. on the ADUC834 however it is possible (by setting cfg834.7) to enable the 11-bit extended stack pointer. in this case the stack will rollover from ffh in ram to 0100h in xram. the 11-bit stack pointer is visable in the sp and sph sfrs. the sp sfr is located at 81h as with a standard 8052. the sph sfr is located at b7h. the 3 lsbs of this sfr contain the 3 extra bits necessary to extend the 8-bit stack pointer into an 11-bit stack pointer. upper 1792 bytes of on-chip xram (data +stack for exsp=1, data only for exsp=0) 256 bytes of on-chip data ram (data + stack) lower 256 bytes of on-chip xram (data only) 00h ffh 100h 00h 07ffh cfg834.7 = 0 cfg834.7 = 1 figure 13. extended stack pointer operation
(12 march 2002) rev. p rc ADUC834 ? 22 ? preliminary technical data external data memory (external xram) just like a standard 8051 compatible core the ADUC834 can access external data memory using a movx instruction. the movx instruction automatically outputs the various control strobes required to access the data memory. the ADUC834 however, can access up to 16mbytes of extrenal data memory. this is an enhancement of the 64kbytes external data memory space available on a standard 8051 compatible core. the external data memory is discussed in more detail in the ADUC834 hardware design considerations section. internal xram 2kbytes of on-chip data memory exist on the ADUC834. this memory although on-chip is also accessed via the movx in- struction. the 2kbytes of internal xram are mapped into the bottom 2kbytes of the external address space if the cfg834.0 bit is set, otherwise access to the external data memory will occur just like a standard 8051. even with the cfg834.0 bit set access to the external xram will occur once the 24 bit dptr is greater than 0007ffh. when accessing the internal xram the p0, p2 port pins as well as the rd and wr strobes will not be output as per a standard 8051 movx instruction. this allows the user to use these port pins as standard i/o. external data memory space (24-bit address space) 000000h ffffffh cfg834.0=0 external data memory space (24-bit address space) 000000h ffffffh cfg834.0=1 0007ffh 000800h 2 kbytes on-chip xram figure 14. internal and external xram special function registers (sfrs) the sfr space is mapped into the upper 128 bytes of internal data memory space and accessed by direct addressing only. it provides an interface between the cpu and all on chip periph- erals. a block diagram show ing the programming model of the ADUC834 via the sfr area is shown in figure 15. all registers except the program counter (pc) and the four general- purpose register banks, reside in the sfr area. the sfr registers include control, configuration, and data regis- ters that provide an interface between the cpu and all on-chip peripherals. 128-byte special function register area 62 kbyte electrically reprogrammable nonvolatile flash/ee program memory 8051- compatible core other on-chip peripherals temp sensor current sources 12-bit dac serial i/o wdt, psm tic, pll dual sigma-delta adcs 4 kbyte electrically reprogrammable nonvolatile flash/ee data memory 256 bytes ram 2k xram figure 15. programming model accumulator sfr (acc) acc is the accumulator register and is used for math opera- tions including addition, subtraction, integer multiplication and division, and boolean bit manipulations. the mnemonics for accumula tor-specific instructions refer to the accumulator as a. b sfr (b) the b register is used with the acc for multiplication and division operations. for other instructions it can be treated as a general-purpose scratchpad register. stack pointer (sp and sph) the sp sfr is the stack pointer and is used to hold an internal ram address that is called the ?top of the stack.? the sp register is incremented before data is stored during push and call execu tions. while the stack may reside anywhere in on-chip ram, the sp register is initialized to 07h after a reset. this causes the stack to begin at location 08h. as mentioned earlier the ADUC834 offers an extended 11-bit stack pointer. the 3 extra bits to make up the 11-bit stack pointer are the 3 lsbs of the sph byte located at b7h.
rev. p rc (12 march 2002) ADUC834 ? 23 ? preliminary technical data data pointer (dptr) the data pointer is made up of three 8-bit registers, named dpp (page byte), dph (high byte) and dpl (low byte). these are used to provide memory addresses for internal and external code access and external data access. it may be ma- nipulated as a 16-bit register (dptr = dph, dpl), although inc dptr instructions will automatically carry over to dpp, or as three independent 8-bit registers (d pp, dph, dpl). the ADUC834 supports dual data pointers. refer to the dual data pointer section later in this datasheet. program status word (psw) the psw sfr contains seve ral bits reflecting the current status of the cpu as detailed in table i. sfr address d0h power on default value 00h bit addressable yes table i. psw sfr bit designations bit name description 7 cy carry flag 6 ac auxiliary carry flag 5 f0 general-purpose flag 4 rs1 register bank select bits 3 rs0 rs1 rs0 selected bank 000 011 102 113 2 ov overflow flag 1 f1 general-purpose flag 0 p parity bit power control sfr (pcon) the pcon sfr contains bits for power-saving options and general-purpose status flags as shown in table ii. sfr address 87h power on default value 00h bit addressable no table ii. pcon sfr bit designations bit name description 7 smod double uart baud rate 6 seripd spi power-down interrupt enable 5 int0pd int0 power-down interrupt enable 4 aleoff disable ale output 3 gf1 general-purpose flag bit 2 gf0 general-purpose flag bit 1 pd power-down mode enable 0 idl idle mode enable ADUC834 configuration sfr (cfg834) the cfg834 sfr contains the necessary bits to configure the internal xram and the extended sp. by default it configures the user into 8051 mode. i.e. extended sp is disabled, internal xram is disabled. sfr address afhh power on default value 00h bit addressable no table iii. cfg834 sfr bit designations bit name description 7 exsp extended sp enable if this bit is set then the stack will rollover from sph/sp = 00ffh to 0100h. if this bit is clear then the sph sfr will be disabled and the stack will rollover from sp=ffh to sp =00h 6 ---- ---- 5 ---- ---- 4 ---- ---- 3 ---- ---- 2 ---- ---- 1 ---- ---- 0 xramen xram enable bit if this bit is set then the internal xram will be mapped into the lower 2kbytes of the external address space. if this bit is clear then the internal xram will not be accessible and the external data memory will be mapped into the lower 2kbytes of external data memory. (see fig 14) .
(12 march 2002) rev. prc ADUC834 ? 24 ? preliminary technical data figure 16. special function register locations and reset values complete sfr map figure 16 below shows a full sfr memory map and the sfr contents after reset. not used indicates unoccupied sfr locations. unoccupied locations in the sfr address space are not implemented; i.e., no register exists at this location. if an unoccupied location is read, an unspecified value is returned. sfr locations that are reserved for future use are shaded (reserved) and should not be accessed by user software. * calibration coefficients are preconfigured at power-up to factory calibrated values. ie0 89h 0 it0 88h 0 tcon 88h 00h bit mnemonic bit bit address mnemonic default value sfr address these bits are contained in this byte. default bit value sfr map key: sfr note: sfrs whose addresses end in 0h or 8h are bit-addressable.
rev. p rc (12 march 2002) ADUC834 ? 25 ? preliminary technical data user interface to the primary and auxiliary adcs both adcs are controlled and configured via a number of sfrs that are mentioned here and described in more detail in the following pages. adcstat: adc status register. holds general status of the primary and auxiliary adcs. adcmode: adc mode register. controls general modes of operation for primary and auxiliary adcs. adc0con: primary adc control register. controls specific configuration of primary adc. adc1con: a uxiliary adc control register. controls specific configuration of auxiliary adc. sf: sinc filter register. configures the decimation factor for the sinc 3 filter and thus the pri mary and auxiliary adc update rates. icon: current source control register. allows user control of the various on-chip current source options. adc0l/m/h: primary adc 24-bit conversion result held in these three 8-bit registers. adc1l/h: auxiliary adc 16-bit conversion result held in these two 8-bit registers. of0l/m/h: prim ary adc 24-bit offset calibration coeffi- cient held in these three 8-bit registers. of1l/h: auxiliary adc 16-bit offset calibration coef ficient held in these two 8-bit registers. gn0l/m/h: primary adc 24-bit gain calibration coefficient held in these three 8-bit registers. gn1l/h: auxiliary adc 16-bit gain calibration coeffi- cient held in these two 8-bit registers. adcstat?(adc status register) this sfr reflects the status of both adcs including data ready, calibration and various (adc-related) error and warning condi- tions including reference detect and conversion overflow/underflow flags. sfr address d8h power-on default value 00h bit addressable yes table iv. adcstat sfr bit designations bit name description 7 rdy0 ready bit for primary adc. set by hardware on completion of adc conversion or calibration cycle. cleared directly by the user or indirectly by write to the mode bits to start another primary adc conversion or calibration. the primary adc is inhibited from writing further results to its data or calibration registers until the rdy0 bit is cleared. 6 rdy1 ready bit for auxiliary adc. same definition as rdy0 referred to the auxiliary adc. 5 cal calibration status bit. set by hardware on completion of calibration. cleared indirectly by a write to the mode bits to start another adc conversion or calibration. 4 noxref no external reference bit (only active if primary or auxiliary adc is active). set to indicate that one or both of the refin pins is floating or the applied voltage is below a specified threshold. when set conversion results are clamped to all ones, if using ext. reference. cleared to indicate valid v ref . 3 err0 primary adc error bit. set by hardware to indicate that the result written to the primary adc data registers has been clamped to all zeros or all ones. after a calibration this bit also flags error conditions that caused the calibra tion registers not to be written. cleared by a write to the mode bits to initiate a conversion or calibration. 2 err1 auxiliary adc error bit. same definition as err0 referred to the auxiliary adc. 1 --- reserved for future use. 0 --- reserved for future use.
(12 march 2002) rev. p rc ADUC834 ? 26 ? preliminary technical data adcmode (adc mode register) used to control the operational mode of both adcs. sfr address d1h power-on default value 00h bit addressable no table v. adcmode sfr bit designations bit name description 7 --- reserved for future use. 6 --- reserved for future use. 5 adc0en primary adc enable. set by the user to enable the primary adc and place it in the mode selected in md2-md0 below cleared by the user to place the primary adc in power-down mode. 4 adc1en auxiliary adc enable. set by the user to enable the auxiliary adc and place it in the mode selected in md2-md0 below cleared by the user to place the auxiliary adc in power-down mode. 3 --- reserved for future use. 2 md2 primary and auxiliary adc mode bits. 1 md1 these bits select the operational mode of the enabled adc as follows: 0 md0 md2 md1 md0 0 0 0 adc power-down mode (power-on default) 0 0 1 idle mode in idle mode the adc filter and modulator are held in a reset state although the modulator clocks are still provided. 0 1 0 single conversion mode in single conversion mode, a single conversion is performed on the enabled adc. on completion of the conversion, the adc data regis- ters (adc0h/m/l and/or adc1h/l) are updated, the relevant flags in the adcstat sfr are written, and power-down is re-entered with the md2?md0 accordingly being written to 000. 0 1 1 continuous conversion in continuous conversion mode the adc data registers are regularly updated at the selected update rate (see sf register) 1 0 0 internal zero-scale calibration internal short automatically connected to the enabled adc(s) 1 0 1 internal full-scale calibration internal or external v ref (as determined by xref0 and xref1 bits in adc0/1con) is automatically connected to the adc input for this calibration. 1 1 0 system zero-scale calibration user should connect system zero-scale input to the adc input pins as selected by ch1/ch0 and ach1/ach0 bits in the adc0/ 1con register. 1 1 1 system full-scale calibration user should connect system full-scale input to the adc input pins as selected by ch1/ch0 and ach1/ach0 bits in the adc0/1con register. notes 1. any change to the md bits will immediately reset both adcs. a write to the md2?0 bits with no change is also treated as a reset. (see exception to this in note 3 below.) 2. if adc0con is written when adc0en = 1, or if adc0en is changed from 0 to 1, then both adcs are also immediately reset. in other words, the primary adc is given priority over the auxiliary adc and any change requested on the primary adc is immediately responded to. 3. on the other hand, if adc1con is written or if adc1en is changed from 0 to 1, only the auxiliary adc is reset. for example, if the primary adc is continu- ously converting when the auxiliary adc change or enable occurs, the primary adc continues undisturbed. rather than allow the auxiliary adc to operate with a phase difference from the primary adc, the auxiliary adc will fall into step with the outputs of the primary adc. the result is that the first conversion time for the auxiliary adc will be delayed up to three outputs while the auxiliary adc update rate is synchronized to the primary ad c. 4. once adcmode has been written with a calibration mode, the rdy0/1 bits (adcstat) are immediately reset and the calibration commences. on comple- tion, the appropriate calibration registers are written, the relevant bits in adcstat are written, and the md2?0 bits are reset to 000 to indicate the adc is back in power-down mode. 5. any calibration request of the auxiliary adc while the temperature sensor is selected will fail to complete. although the rdy 1 bit will be set at the end of the calibration cycle, no update of the calibration sfrs will take place and the err1 bit will be set. 6. calibrations are performed at maximum sf (see sf sfr) value guaranteeing optimum calibration operation.
rev. p rc (12 march 2002) ADUC834 ? 27 ? preliminary technical data adc0con (primary adc control register) and adc1con (auxiliary adc control register) the adc0con and adc1con sfrs are used to configure the primary and auxiliary adc for reference and channel selection, unipolar or bipolar coding and in the case of the primary adc for range ( the aux adc operates on a fixed input range of v ref .), adc0con primary adc control sfr sfr address d2h power-on default value 07h bit addressable no adc1con auxiliary adc control sfr sfr address d3h power-on default value 00h bit addressable no table vi. adc0con sfr bit designations bit name description 7 --- reserved for future use. 6 xref0 primary adc external reference select bit. set by user to enable the primary adc to use the external reference via refin(+)/refin(?). cleared by user to enable the primary adc to use the internal bandgap reference (v ref = 1.25 v). 5 ch1 primary adc channel selection bits. 4 ch0 written by the user to select the differential input pairs used by the primary adc as follows: ch1 ch0 positive input negative input 0 0 ain1 ain2 0 1 ain3 ain4 1 0 ain2 ain2 (internal short) 1 1 ain3 ain2 3 uni0 primary adc unipolar bit. set by user to enable unipolar coding, i.e., zero differential input will result in 000000 hex output. cleared by user to enable bipolar coding, zero differential input will result in 800000 hex output. 2 rn2 primary adc range bits. 1 rn1 written by the user to select the primary adc input range as follows: 0 rn0 rn2 rn1 rn0 selected primary adc input range (v ref = 2.5 v) 0 0 0 20 mv (0-20mv in unipolar mode) 0 0 1 40 mv (0-40mv in unipolar mode) 0 1 0 80 mv (0-80mv in unipolar mode) 0 1 1 160 mv (0-160mv in unipolar mode) 1 0 0 320 mv (0-320mv in unipolar mode) 1 0 1 640 mv (0-640mv in unipolar mode) 1 1 0 1.28 v (0-1.28v in unipolar mode) 1 1 1 2.56 v (0-2.56v in unipolar mode) table vii. adc1con sfr bit designations bit name description 7 --- reserved for future use. 6 xref1 auxiliary adc external reference bit. set by user to enable the auxiliary adc to use the external reference via refin(+)/refin(?). cleared by user to enable the auxiliary adc to use the internal bandgap reference. 5 ach1 auxiliary adc channel selection bits. 4 ach0 w ritten by the user to select the single-ended input pins used to drive the auxiliary adc as fo llows: ach1 ach0 positive input negative input 0 0 ain3 agnd 0 1 ain4 agnd 1 0 temp sensor * agnd (temp. sensor routed to the adc input) 1 1 ain5 agnd 3 uni1 auxiliary adc unipolar bit. set by user to enable unipolar coding, i.e., zero input will result in 0000 hex output. cleared by user to enable bipolar coding, zero input will result in 8000 hex output. 2 --- reserved for future use. 1 --- reserved for future use. 0 --- reserved for future use. * notes 1. when the temperature sensor is selected, user code must select internal reference via xref1 bit above and clear the uni1 bit (adc1con.3) to select bipolar coding. 2. the temperature sensor is factory calibrated to yield conversion results 8000h at 0c. 3. a +1c change in temperature will result in a +1 lsb change in the adc1h register adc conversion result.
(12 march 2002) rev. p rc ADUC834 ? 28 ? preliminary technical data adc0h/adc0m/adc0l (primary adc conversion result registers) these three 8-bit registers hold the 24-bit conversion result from the primary adc. sfr address adc0h high data byte dbh adc0m middle data byte dah adc0l low data byte d9h power-on default value 00h both registers bit addressable no both registers adc1h/adc1l (auxiliary adc conversion result registers) these two 8-bit registers hold the 16-bit conversion result from the auxiliary adc. sfr address adc1h high data byte ddh adc1l low data byte dch power-on default value 00h both registers bit addressable no both registers of0h/of0m/of0l (primary adc offset calibration registers 1 ) these three 8-bit registers hold the 24-bit offset calibration coefficient for the primary adc. these registers are configured at power-on with a factory default value of 800000hex. however, these bytes will be automatically overwritten if an internal or system zero-scale calibration is initiated by the user via md2?0 bits in the adcmode register. sfr address of0h primary adc offset coefficient high byte e3h of0m primary adc offset coefficient middle byte e2h of0l primary adc offset coefficient low byte e1h power-on default value 800000h of0h and of0m respectively bit addressable no both registers of1h/of1l (auxiliary adc offset calibration registers 1 ) these two 8-bit registers hold the 16-bit offset calibration coefficient for the auxiliary adc. these registers are config ured at power- on with a factory default value of 8000hex. however, these bytes will be automatically overwritten if an internal or system zero-scale calibration is initiated by the user via the md2?0 bits in the adcmode register. sfr address of1h auxiliary adc offset coefficient high byte e5h of1l auxiliary adc offset coefficient low byte e4h power-on default value 8000h of1h and of1l respectively bit addressable no both registers gn0h/gn0m/gn0l (primary adc gain calibration registers 1 ) these three 8-bit registers hold the 24-bit gain calibration coefficient for the primary adc. these registers are configured a t power-on with a factory-calculated internal full-scale calibration coefficient. every device will have an individual coefficient. how- ever, these bytes will be automatically overwritten if an internal or system full-scale calibration is initiated by the user via md2?0 bits in the adcmode register. sfr address gn0h primary adc gain coefficient high byte ebh gn0m pri mary adc gain coefficient middle byte eah gn0l primary adc gain coefficient low byte e9h power-on default value configured at factory final test, see notes above. bit addressable no both registers gn1h/gn1l (auxiliary adc gain calibration registers 1 ) these two 8-bit registers hold the 16-bit gain calibration coefficient for the auxiliary adc. these registers are configured at power- on with a factory calculated internal full-scale calibration coefficient. every device will have an individual coefficient. how ever, these bytes will be automatically overwritten if an internal or system full-scale calibration is initiated by the user via md2?0 bits in the adcmode register. sfr address gn1h auxiliary adc gain coefficient high byte edh gn1l auxiliary adc gain coefficient low byte ech power-on default value configured at factory final test, see notes above. bit addressable no both registers note 1 these registers can be overwritten by user software only if mode bits md0?2 (adcmode sfr) are zero.
rev. p rc (12 march 2002) ADUC834 ? 29 ? preliminary technical data icon (current sources control register) used to control and configure the various excitation and burnout current source options available on-chip. sfr address d5h power-on default value 00h bit addressable no table ix. icon sfr bit designations bit name description 7 --- reserved for future use. 6 bo burnout current enable bit. set by user to enable both transducer burnout current sources in the primary adc signal paths. cleared by user to disable both transducer burnout current sources. 5 adc1ic auxiliary adc current correction bit. set by user to allow scaling of the auxiliary adc by an internal current source calibration word. 4 adc0ic primary adc current correction bit. set by user to allow scaling of the primary adc by an internal current source calibration word. 3 i2pin 1 current source-2 pin select bit. set by user to enable current source-2 (200 a) to external pin 3 (p1.2/dac/iexc1). cleared by user to enable current source-2 (200 a) to external pin 4 (p1.3/ain5/iexc2). 2 i1pin 1 current source-1 pin select bit. set by user to enable current source-1 (200 a) to external pin 4 (p1.3/ain5/iexc2). cleared by user to enable current source-1 (200 a) to external pin 3 (p1.2/dac/iexc1). 1 i2en current source-2 enable bit. set by user to turn on excitation current source-2 (200 a). cleared by user to turn off excitation current source-2 (200 a). 0 i1en current source-1 enable bit. set by user to turn on excitation current source-1 (200 a). cleared by user to turn off excitation current source-1 (200 a). note 1 both current sources can be enabled to the same external pin, yielding a 400 a current source. sf (sinc filter register) the number in this register sets the decimation factor and thus the output update rate for the primary and auxiliary adcs. this sfr cannot be written by user software while ei ther adc is active. the update rate applies to both primary and auxiliary adcs and is calculated as follows: f adc = 1 3 1 8.sf f mod where: f adc = adc output update rate f mod = modulator clock frequency = 32.768 khz sf = decimal value of sf register the allowable range for sf is 0dhex to ffhex. examples of sf values and corresponding conversion update rate (f adc ) and conversion time (t adc ) are shown in table viii, the power-on default value for the sf register is 45 hex, resulting in a de- fault adc update rate of just under 20 hz. both adc inputs are chopped to minimize offset errors, which means that the settling time for a single conversion or the time to a first con- version result in continuous conversion mode is 2 t adc . as mentioned earlier, all calibration cycles will be carried out automatically with a maxi mum, i.e., ffhex, sf value to ensure optimum calibration performance. once a calibration cycle has completed, the value in the sf register will be that programmed by user software. table viii. sf sfr bit designations sf(dec) sf(hex) f adc (hz) t adc (ms) 13 0d 105.3 9.52 69 45 19.79 50.34 255 ff 5.35 186.77
(12 march 2002) rev. p rc ADUC834 ? 30 ? preliminary technical data table x. primary adc, typical output rms noise (    v) typical output rms noise vs. input range and update rate; output rms noise in    v sf data update input range word rate (hz)    20 mv    40 mv    80 mv    160 mv    320 mv    640 mv 1.28 v 2.56 v 13 105.3 1.50 1.50 1.60 1.75 3.50 4.50 6.70 11.75 69 19.79 0.60 0.65 0.65 0.65 0.65 0.95 1.40 2.30 255 5.35 0.35 0.35 0.37 0.37 0.37 0.51 0.82 1.25 table xi. primary adc, peak-to-peak resolution (bits) peak-to-peak resolution vs. input range and update rate; peak-to-peak resolution in bits sf data update input range word rate (hz)    20 mv    40 mv    80 mv    160 mv    320 mv    640 mv    1.28 v    2.56 v 13 105.3 12 13 14 15 15 15.5 16 16 69 19.79 13 14 15 16 17 17.5 18 18.5 255 5.35 14 15 16 17 18 18.5 18.8 19.2 table xii. auxiliary adc typical output rms noise vs. update rate 1 output rms noise in    v sf data update input range word r ate (hz) 2.5 v 13 105.3 10.75 69 19.79 2.00 255 5.35 1.15 note 1 adc converting in bipolar mode. peak-to-peak resolution vs. update rate 1 peak-to-peak resolution in bits sf data update input range word rate (hz) 2.5 v 13 105.3 16 2 69 19.79 16 255 5.35 16 notes 1 adc converting in bipolar mode. 2 in unipolar mode peak-to-peak resolution at 105 hz is 15 bits. primary and auxiliary adc noise performance tables x, xi and xii below show the output rms noise in v and output peak-to-peak resolution in bits (rounded to the nearest 0.5 lsb) for some typical output update rates on both the primary and auxiliary adcs. the numbers are typical and are generated at a differential input voltage of 0v. the output update rate is selected via the sinc filter (sf) sfr. it is impor- tant to note that the peak-to-peak resolution figures represent the resolution for which there will be no code flicker within a six-sigma limit. the quickstart development system pc software comes com- plete with an adc noise evaluation tool. this tool can be easily used with the evalustion board to see these figures from silicon.
rev. p rc (12 march 2002) ADUC834 ? 31 ? preliminary technical data primary and auxiliary adc circuit description overview the ADUC834 incorporates two independent sigma-delta adcs (primary and auxiliary) with on-chip digital filtering intended for the measurement of wide dynamic range, low frequency signals such as those in weigh-scale, strain-gauge, pressure trans- ducer or temperature measurement applications. primary adc this adc is intended to convert the primary sensor input. the input is buffered and can be programmed for one of 8 input ranges from 20 mv to 2.56 v being driven from one of three differential input channel options ain1/2, ain3/4, or ain3/2. the input channel is internally buffered allowing the part to handle significant source impedances on the analog input, sigma- delta modulator programmable digital filter sigma-delta a/d converter buffer agnd av dd refin(-) refin(+) programmable gain amplifier the programmable gain am plifier all ow s eight unipolar and eight bipolar input ranges from 20mv to 2.56v (ext vref = +2.5v) the modulator provides a high-frequency 1-bit data stream (the output of w hich is also c ho p pe d) to the digital filter, the duty cycle of w hich represents the sampled analog input voltage sigma-delta modulator chop analog input chopping the inputs are alternately reversed through the conversion cycle. chopping yields excellent adc offset and offset drift performance output average as part of the chopping implementation, each data w ord outp ut from the filter is summed and averaged with its predecessor to null adc channel offset errors ain1 ain2 ain3 ain4 bu ffe r am plifie r the buffer amplifier presents a high impedance input stage for the analog inputs, allowing significant external source impedances burnout currents two 100na burnout currents allow the user to easily detect if a transducer has burned out or gone op en-circuit programmable digital filter the sinc 3 filter removes quantization noise introduced by the modulator. the update rate and bandwidth of this filter are programmable via the sf sfr the ouput word from the digital filter is scaled by the calibration coefficients before being provided as the conversion result output scaling analog multiplexer a differential multip lexer allows selection of three fully differential pair options and additional internal short option (ain2 ? ain2).the multiplexer is controlled via the channel selection bits in adc0con sigma-delta adc the sigma-delta architecture ensures 24 bits no missing codes. the entire sigma- delta adc is chopped to remove drift error output average output scaling digtal output result w ritte n to adc0h/m/l sfrs pga differential reference the external reference input to th e ADUC834 is differential and fa cilita tes ratio metr ic operation. the external reference voltage is select- ed via the xref0 bit in adc0con. reference detect circuitry tests for open or shorted references inputs chop mux see page 36 see page 29 and 34 see page 33 see page 34 see page 35 see page 35 see page 36 see page 35 see page 34 see page 33 see pages 27 and 33 figure 17. primary adc block diagram allowing r/c filtering (for noise rejection or rfi reduction) to be placed on the an alog inputs if required. on-chip burnout currents can also be turned on. these currents can be used to check that a trans ducer on the selected channel is still operational before att empting to take measurements. the adc employs a sigma-delta conversion technique to real- ize up to 24 bits of no missing codes performance. the sigma-delta modulator converts the sampled input signal into a digital pulse train whose duty cycle contains the digital infor- mation. a sinc 3 programmable low-pass filter is then employed to decimate the modulator output data stream to give a valid data conversion result at programmable output rates from 5.35 hz (186.77 ms) to 105.03 hz (9.52 ms). a chopping scheme is also employed to minimize adc offset errors. a block diagram of the primary adc is shown in figure 17.
(12 march 2002) rev. p rc ADUC834 ? 32 ? preliminary technical data auxiliary adc the auxiliary adc is intended to convert supplementary inputs such as those from a cold junction diode or thermistor. this adc is not buffered and has a fixed input range of 0 v to 2.5 v (as- suming an external 2.5 v reference). the single-ended inputs can be mux ain3 ain4 ain5 on-chip tem perature sensor sigma- delta modulator programmable digital filter sigma-delta a/d converter refin( ? ) refin(+) cho p output average output scaling digtal output result written to adc1h/l sfrs chop differential reference the external reference input to the ADUC834 is differential and facilitates ratiometric operation. the external reference voltage is selected via the xref1 bit in adc1con. reference detect circuitry tests for open or shorted references inputs see page 35 the modulator provides a high frequency 1-bit data stream (the output of which is also chopped) to the digital filter, the duty cycle of which represents the sampled analog input voltage sigma delta modulator see page 34 programmable digital filter the sinc 3 filter removes quantization noise introduced by the modulator. the update rate and bandwidth of this filter are programmable via the sf sfr see page 35 output average as part of the chopping implementation each data word output from the filter is summed and averaged with its predecessor to null adc channel offset errors see page 35 sigma-delta adc the sigma-delta architecture ensures 16 bits no missing codes. the entire sigma-delta adc is chopped to remove drift errors see page 35 the ouput word from the digital filter is scaled by the calibration coefficients before being provided as the conversion result output scaling see page 36 analog input chopping the inputs are alternately reversed through the conversion cycle. chopping yields excellent adc offset and offset drift performance see page 36 analog multiplexer a differential multiplexer allows selection of three external single ended inputs or the on-chip temp. sensor. the multiplexer is controlled via the channel selection bits in adc1con see page 28 and 33 mux figure 18. auxiliary adc block diagram driven from ain3, ain4 or ain5 pins or directly from the on-chip temperature sensor voltage. a block diagram of the auxiliary adc is shown in figure 18.
rev. p rc (12 march 2002) ADUC834 ? 33 ? preliminary technical data analog input channels the primary adc has four associated analog input pins (la- belled ain1 to ain4) which can be configured as two fully differential input channels. channel selection bits in the adc0con sfr detailed in table vi allow three combina- tions of differential pair selection as well as an additional shorted input op tion (ain2?ain2). the auxiliary adc has three external input pins (labelled ain3 to ain5) as w ell as an internal connection to the internal on-chip t emperature sensor. all inputs to the auxiliary adc are single-en ded inputs referenced to the agnd on the part. channel selection bits in the adc1con sfr detailed pre- viously in table vii allow selection of one of four inputs. two input multiplexers switch the selected input channel to the on-chip buffer amplifier in the case of the primary adc and directly to the sigma-delta modulator input in the case of the auxiliary adc. when the analog input channel is switched, the settling time of the part must elapse before a new valid word is available from the adc. primary and auxiliary adc inputs the output of the primary adc multiplexer feeds into a high impedance input stage of the buffer amplifier. as a result, the primary adc inputs can handle significant source impedances and are tailored for direct connection to external resistive -type sensors like strain gauges or resistance tempera- ture detectors (rtds). the auxiliary adc, however, is unbuffered resulting in higher analog input current on the auxiliary adc. it should be noted that this unbuffered input path provides a dynamic load to the driving source. therefore, resistor/capacitor combinations on the input pins can cause dc gain errors depending on the output imped ance of the source that is driving the adc inputs. analog input ranges the absolute input voltage range on the primary adc is re- stricted to between agnd + 100 mv to avdd ?100 mv. care must be taken in setting up the common-mode voltage and input voltage range so that these limits are not exceeded, other- wise there will be a degradation in linearity performance. the absolute input voltage range on the auxiliary adc is re- stricted to between agnd ? 30 mv to avdd + 30 mv. the slightly negative absolute input voltage limit does allow the possibility of mon itoring small signal bipolar signals using the single-ended auxiliary adc front end. programmable gain amplifier the output from the buffer on the primary adc is applied to the input of the on-chip programmable gain amplifier (pga). the pga can be programmed through eight different unipolar input ranges and bipolar ranges. the pga gain range is pro- grammed via the range bits in the adc0con sfr. with the external reference select bit set in the adc0con sfr and an external 2.5v reference, the unipolar ranges are 0 mv to +20 mv, 0 mv to 40 mv, 0 mv to 80 mv, 0 mv to 160 mv, 0 mv to 320 mv, 0 mv to 640 mv and 0 v to 1.28 v and 0 to 2.56 v while the bipolar ranges are 20 mv, 40 mv, 80 mv, 160 mv, 320 mv, 640 mv, 1.28 v and 2.56 v. these are the nomi nal ranges that should appear at the input to the on-chip pga. an adc range matching specifica- tion of 0.5 lsb (typ) across all ranges m eans that calibration need only be carried out at a single gain range and does not have to be repeated when the pga gain range is changed. typical matching across ranges is shown in figure 19 below. here, the primary adc is configured in bipolar mode with an external 2.5 v reference, while just greater than 19 mv is forced on its inputs. the adc continuously converts the dc input voltage at an update rate of 5.35 hz, i.e., sf = ffhex. in total, 800 conversion results are gathered. the first 100 re- sults are gathered with the primary adc operating in the 20 mv range. the adc range is then switched to 40 mv and 100 more con version results are gathered, and so on until the last group of 100 samples are gathered with the adc configured in the 2.56 v range. from figure 19, the variation in the sample mean through each range, i.e., the range matching, is seen to be of the order of 2 v. the auxiliary adc does not incorporate a pga and is config- ured for a fixed single input range of 0 to v ref . 0 1 00 200 300 400 5 00 600 7 00 800 sample count ad c i n pu t vo l t ag e ? mv 19.372 19.371 19.370 19.369 19.368 19.367 19.366 19.365 19.364 adc range  20 m v  40 m v  80 m v  16 0m v  32 0m v  64 0v  1. 2 8 v  2. 5 6 v figure 19. primary adc range matching bipolar/unipolar inputs the analog inputs on the ADUC834 can accept either uni- polar or bipolar input voltage ranges. bipolar input ranges do not imply that the part can handle negative voltages with respect to system agnd. unipolar and bipolar signals on the ain(+) input on the pri- mary adc are referenced to the voltage on the respective ain(?) input. for example, if ain(?) is 2.5 v and the primary adc is config ured for an analog input range of 0 mv to +20 mv, the input voltage range on the ain(+) input is 2.5 v to 2.52 v. if ain(?) is 2.5 v and the ADUC834 is configured for an analog input range of 1.28 v, the analog input range on the ain(+) input is 1.22 v to 3.78 v (i.e., 2.5 v 1.28 v). as mentioned earlier, the auxiliary adc input is a single- ended input with respect to the system agnd. in this context a bipolar signal on the auxiliary adc can only span 30 mv negative with respect to agnd before violating the voltage input limits for this adc. bipolar or unipolar options are chosen by programming the primary and auxiliary unipolar enable bits in the adc0con and adc1con sfrs respectively. this programs the relevant adc for either unipolar or bipolar operation. programming for either unipolar or bipolar operation does not change any of the
(12 march 2002) rev. p rc ADUC834 ? 34 ? preliminary technical data input signal conditioning; it simply changes the data output cod- ing and the points on the transfer function where calibrations occur. when an adc is configured for unipolar operation, the output coding is natural (straight) binary with a zero differential input volt age resulting in a code of 000 . . . 000, a midscale volt age resulting in a code of 100 . . . 000, and a full- scale input voltage resulting in a code of 111 . . . 111. when an adc is configured for bipolar operation, the coding is offset binary with a negative fu ll-scale voltage resulting in a code of 000 . . . 000, a z ero differential voltage resulting in a code of 100 . . . 000, and a positive full-scale voltage resulting in a code of 111 . . . 111. reference input the ADUC834?s reference inputs, refin(+) and refin(?), provide a differential reference input capability. the com- mon-mode range for these differential inputs is from agnd to avdd. the nominal reference voltage, vref (refin(+) ? refin(? )), for specified operation is 2.5 v with the pri- mary and auxiliary reference enable bits set in the respective adc0con and/or adc1con sfrs. the part is also functional (although not specified for per- formance) when the xref0 or xref1 bits are ?0,? which enables the on-chip internal bandgap reference. in this mode, the adcs will see the internal reference of 1.25 v, therefore halving all input ranges. as a result of using the internal reference voltage, a noticeable degradation in peak-to-peak resolution will result. therefore, for best performance, opera- tion with an external reference is strongly recommended. in applications where the excitation (voltage or current) for the transducer on the analog input also drives the reference voltage for the part, the effect of the low-frequency noise in the excita- tion source will be r emoved as the application is ratiometric. if the ADUC834 is not used in a ratiometric application, a low noise r eference should be used. recommended reference voltage sources for the ADUC834 include the ad780, ref43, and ref192. it should also be noted that the reference inputs provide a high impedance, dynamic load. because the input impedance of each reference input is dynamic, resistor/capacitor combi- nations on these inputs can cause dc gain errors depending on the output impedance of the source that is driving the reference inputs. ref erence voltage sources, like those recom- mended above (e.g., ad780) will typically have low output impedances and therefore decoupling capacitors on the refin(+) input would be recommended. deriving the refer- ence input voltage across an external res istor, as shown in figure 60, will mean that the reference input sees a signifi- cant external source impedance. external decoupling on the refin(+) and re fin(-) pins would not be recommended in this type of circuit configu ration. burnout currents the primary adc on the ADUC834 contains two 100 na constant current generators, one sourcing current from avdd to ain(+), and one sinking from ain(?) to agnd. the currents are swi tched to the selected analog input pair. both currents are either on or off, depending on the burnout cur- rent enable (bo) bit in the icon sfr (see table ix). these currents can be used to verify that an external transducer is still operational before attempting to take measurements on that channel. once the burnout currents are turned on, they will flow in the external transducer circu it, and a measurement of the input voltage on the analog input channel can be taken. if the resultant voltage measured is full-scale, this indicates that the transducer has gone open-circuit. if the voltage measured is 0 v, it indicates that the transducer has short circuited. for normal operation, these burnout currents are turned off by writing a 0 to the bo bit in the icon sfr. the current sources work over the normal absolute input voltage range speci- fications. excitation currents the ADUC834 also contains two identical, 200 a constant current sources. both source current from avdd to pin #3 (iexc1) or pin #4 (iexc2) these current sources are controlled via bits in the icon sfr shown in table ix. they can be configured to source 200 a individually to both pins or a combination of both currents, i.e., 400 a to either of the selected pins. these current sources can be used to excite external resistive bridge or rtd sensors. reference detect the ADUC834 includes on-chip circuitry to detect if the part has a valid reference for conversions or calibrations. if the voltage between the external refin(+) and refin(?) pins goes below 0.3 v or either the refin(+) or refin(?) inputs is open cir cuit, the ADUC834 detects that it no longer has a valid reference. in this case, the noxref bit of the adcstat sfr is set to a 1. if the ADUC834 is performing normal conversions and the noxref bit becomes active, the conversion results revert to all 1s. therefore, it is not necessary to continuously monitor the status of the noxref bit when performing conversions. it is only necessary to verify its status if the conversion result read from the adc data register is all 1s. if the ADUC834 is performing either an offset or gain calibra- tion and the noxref bit becomes active, the updating of the respective calibration registers is inhibited to avoid loading incorrect coefficients to these registers, and the appropriate err0 or err1 bits in the adcstat sfr are set. if the user is concerned about verifying that a valid reference is in place every time a calibration is performed, the status of the err0 or err1 bit should be checked at the end of the calibra- tion cycle. sigma-delta modulator a sigma-delta adc generally consists of two main blocks, an analog modulator and a digital filter. in the case of the ADUC834 adcs, the analog modulators consist of a differ- ence amplifier, an integrator block, a comparator, and a feedback dac as illustrated in figure 20. dac integrator analog input difference amp comparator high- frequency bitstream to digital filter figure 2 0 . sigma-delta modulator simplified block diagram in operation, the analog signal sample is fed to the differ- ence amplifier along with the output of the feedback dac. the difference between these two signals is integrated and fed to the comparator. the output of the comparator provides the input to the feedback dac so the system functions as a negative feedback loop that tries to minimize the difference signal. the
rev. p rc (12 march 2002) ADUC834 ? 35 ? preliminary technical data digital data that represents the analog input voltage is con- tained in the duty cycle of the pulse train appearing at the output of the compara tor. this duty cycle data can be recov- ered as a data word using a sub sequent digital filter stage. the sampling frequency of the modulator loop is many times higher than the bandwidth of the input signal. the integrator in the modulator shapes the quanti zation noise (which results from the analog-to-digital conversion) so that the noise is pushed toward one-half of the modulator fre- quency. digital filter the output of the sigma-delta modulator feeds directly into the digital filter. the digital filter then band-limits the response to a frequency significantly lower than one-half of the modu- lator frequency. in this manner, the 1-bit output of the comparator is translated into a band-limited, low noise output from the ADUC834 adcs. the ADUC834 filter is a low-pass, sinc 3 or (sinx/x) 3 filter whose primary function is to remove the quantization noise introduced at the modulator. the cutoff frequency and deci- mated output data rate of the filter are programmable via the sf (sinc filter) sfr as described in table viii. figure 21 shows the frequency response of the adc chan nel at the default sf word of 69 dec or 45 hex, yielding an overall output update rate of just under 20 hz. it should be noted that this frequency response allows fre- quency components higher than the adc nyquist frequency to pass through the adc, in some cases without significant attenuation. these components may, therefore, be aliased and appear in-band after the sampling process. it should also be noted that rejection of mains-related fre- quency components, i.e., 50 hz and 60 hz, is seen to be at level of >65 db at 50 hz and >100 db at 60 hz. this con- firms the data sheet specifications for 50 hz/60 hz normal mode rejec tion (nmr) at a 20 hz update rate. 0203050708090100110 frequency ? hz ga i n ? db 0 ? 20 ? 40 ? 70 ? 80 ? 90 ? 100 ? 110 ? 120 10 40 60 ? 10 ? 30 ? 60 ? 50 figure 21. filter response, sf = 69 dec the response of the filter, however, will change with sf word as can be seen in figure 22, which shows >90 db nmr at 50 hz and >70 db nmr at 60 hz when sf = 255 dec. 0 203050708090110 frequency ? hz ga i n ? db 0 ? 20 ? 40 ? 70 ? 80 ? 90 ? 100 ? 110 ? 120 10 40 60 ? 10 ? 30 ? 60 ? 50 figure 22. filter response, sf = 255 dec figures 23 and 24 show the nmr for 50 hz and 60 hz across the full range of sf word, i.e., sf = 13 dec to sf = 255 dec. 10 50 70 110 1 50 170 1 90 210 sf ? decimal ga i n ? db 0 ? 20 ? 40 ? 70 ? 80 ? 90 ? 100 ? 110 ? 120 30 90 130 ? 10 ? 30 ? 60 ? 50 230 250 figure 23. 50 hz normal mode rejection vs. sf 10 50 70 110 1 50 170 1 90 210 sf ? decimal ga i n ? db 0 ? 20 ? 40 ? 70 ? 80 ? 90 ? 100 ? 110 ? 120 30 90 130 ? 10 ? 30 ? 60 ? 50 230 2 50 figure 24. 60 hz normal mode rejection vs. sf
(12 march 2002) rev. p rc ADUC834 ? 36 ? preliminary technical data adc chopping both adcs on the ADUC834 implement a chopping scheme whereby the adc repeatability reverses its inputs. the deci- mated digital output words from the sinc 3 filters therefore have a positive offset and negative offset term included. as a result, a final summing stage is included in each adc so that each output word from the filter is summed and averaged with the previous filter output to produce a new valid output result to be written to the adc data sfrs. in this way, while the adc throughput or update rate is as discussed earlier and illustrated in table viii, the full settling time through the adc (or the time to a first conversion result), will actually be given by 2 t adc . the chopping scheme incorporated in the ADUC834 adc re- sults in excellent dc offset and offset drift specifications and is extremely beneficial in applications where drift, noise rejec- tion, and optimum emi rejection are important factors. calibration the ADUC834 provides four calibration modes that can be programmed via the mode bits in the adcmode sfr de- tailed in table v. in fact, every ADUC834 has already been factory calibrated. the resultant offset and gain calibration coefficients for both the primary and auxiliary adcs are stored on-chip in manufacturing-specific flash/ee memory locations. at power- on, these factory calibration coefficients are automatically dow nloaded to the calibration registers in the ADUC834 sfr space. each adc (primary and auxiliary) has dedicated calibration sfrs, these have been described earlier as part of the general adc sfr description. however, the factory calibration values in the adc calibration sfrs will be overwritten if any one of the four calibration options are initiated and that adc is en abled via the adc enable bits in adcmode. even though an internal offset calibration mode is described below, it should be recognized that both adcs are chopped. this chopping scheme inherently minimizes offset and means that an internal offset calibration should never be required. also, be- cause factory 5 v/25c gain calibration coefficients are automatically present at power-on, an internal full-scale cali- bration will only be required if the part is being operated at 3 v or at tempera tures significantly different from 25c. the ADUC834 offers ?internal? or ?system? calibration facili- ties. for full calibration to occur on the selected adc, the calibra tion logic must record the modulator output for two different input conditions. these are ?zero-scale? and ?full- scale? points. these points are derived by performing a conversion on the different i nput voltages provided to the input of the modulator during cal ibration. the result of the ?zero-scale? calibration conversion is stored in the offset calibration registers for the appropriate adc. the result of the ?full-scale? calibration conversion is stored in the gain calibration registers for the appropriate adc. w ith these readings, the calibration logic can calculate the offset and the gain slope for the input-to-output transfer function of the converter. during an ?internal? zero-scale or full-scale calibration, the re- spective ?zero? input and ?full-scale? input are automatically connected to the adc input pins internally to the device. a ?system? calibration, however, expects the system zero-scale and system full-scale voltages to be applied to the external adc pins before the calibration mode is initiated. in this way external adc errors are taken into account and minimized as a result of system calibration. it should also be noted that to optimize calibration accuracy, all ADUC834 adc calibrations are car- ried out auto matically at the slowest update rate. internally in the ADUC834, the coefficients are normalized before being used to scale the words coming out of the digital filter. the offset calibration coefficient is subtracted from the result prior to the multiplication by the gain coefficient. all ADUC834 adc specifications will only apply after a zero-scale and full-scale calibration at the operating point (supply voltage/temperature) of interest. from an operational point of view, a calibration should be treated like another adc conversion. a zero-scale calibration (if re- quired) s hould always be carried out before a full-scale calibration. system software should monitor the relevant adc rdy0/1 bit in the adcstat sfr to determine end of calibration via a polling sequence or interrupt driven routine.
rev. p rc (12 march 2002) ADUC834 ? 37 ? preliminary technical data nonvolatile flash/ee memory flash/ee memory overview the ADUC834 incorporates flash/ee memory technology on- chip to provide the user with nonvolatile, in-circuit reprogrammable, code and data memory space. flash/ee memory is a relatively recent type of nonvolatile memory t echnology and is based on a single transistor cell architecture. this technology is basically an outgrowth of eprom technology and was developed through the late 1980s. flash/ee memory takes the flexible in-circuit reprogrammable features of eeprom and com bines them with the space efficient/density features of eprom (see figure 25). because flash/ee technology is based on a single transistor cell architecture, a flash memory array, like eprom, can be imple mented to achieve the space efficiencies or memory densities required by a given design. like eeprom, flash memory can be programmed in-system at a byte level, although it must first be erased; the erase being performed in page blocks. thus, flash memory is often and more correctly referred to as flash/ee memory. flash/ee memory technology space efficient/ density in-circuit reprogram mable eprom technology eeprom technology figure 25. flash/ee memory development overall, flash/ee memory represents a step closer to the ideal memory device that includes nonvolatility, in-circuit program- mability, high density and low cost. incorporated in the ADUC834, flash/ee memory technology allows the user to update program code space in-circuit, without the need to replace one-time programmable (otp) devices at remote operating nodes. flash/ee memory and the ADUC834 the ADUC834 provides two arrays of flash/ee memory for user applications. 62kbytes of flash/ee program s pace are pro- vided on-chip to facilitate code execution without any external discrete rom device requirements. the program memory can be programmed in-circuit, using the serial download mode provided, using conventional third party memory programmers or via a user defined protocol who can configure it as data if required. a 4kbyte flash/ee data memory space is also provided on- chip. this may be used as a general-purpose nonvolatile scratchpad area. user access to this area is via a group of six sfrs. this space can be programmed at a byte level, although it must first be erased in 4-byte pages. ADUC834 flash/ee memory reliability the flash/ee program and data memory arrays on the ADUC834 are fully qualified for two key flash/ee memory characteristics, namely flash/ee memory cycling endurance and flash/ee memory data retention. endurance quantifies the ability of the flash/ee memory to be cycled through many program, read, and erase cycles. in real terms, a single endurance cycle is composed of four inde- pendent, sequential events. these events are defined as: a. initial page erase sequence b. read/verify sequence a single flash/ee c. byte program sequence memory d. second read/verify sequence endurance cycle in reliability qualification, every byte in both the program and data flash/ee memory is cycled from 00 hex to ffhex until a first fail is recorded signifying the endurance limit of the on-chip flash/ee memory. as indicated in the specification pages of this data sheet, the ADUC834 flash/ee memory endurance qualification has been carried out in accordance with jedec specification a117 over the industrial temperature range of ? 40 c, +25 c, and +85 c. the results allow the specification of a minimum endurance figure over supply and temperature of 100,000 cycles, with an endur ance figure of 700,000 cycles being typical of operation at 25 c. retention quantifies the ability of the flash/ee memory to retain its pr ogrammed data over time. again, the ADUC834 has been qualified in accordance with the formal jedec re- tention life time specification (a117) at a specific junction temperature (t j = 55 c). as part of this qualification proce- dure, the flash/ee memory is cycled to its specified endurance limit described above, before data retention is characterized. this means that the flash/ee memory is guaranteed to retain its data for its full specified retention lifetime every time the flash/ee memory is repro grammed. it should also be noted that retention lifetime, based on an activation energy of 0.6 ev, will derate with t j as shown in figure 26. 40 60 70 90 t j junction temperature ?  c re t en t i on ? y e a rs 250 200 150 100 50 0 50 80 110 300 100 adi specification 100 years min. at t j = 55  c figure 26. flash/ee memory data retention
(12 march 2002) rev. p rc ADUC834 ? 38 ? preliminary technical data using the flash/ee program memory the 62kbyte flash/ee program memory array is mapped into the lower 62kbytes of the 64 kbytes program space addressable by the ADUC834, and is used to hold user code in typical applications. the program memory flash/ee memory arrays can be pro- grammed in three ways, namely: (1) serial downloading (in-circuit programming) the ADUC834 facilitates code download via the standard uart serial port. the ADUC834 will enter serial download mode after a reset or power cycle if the psen pin is pulled low through an external 1k ? resistor. once in serial download mode, the user can download code to the full 62kbytes of flash/ ee program memory while the device is in circuit in its target application hardware. a pc serial download executable is provided as part of the ADUC834 quickstart development system. the serial down- load protocol is detailed in a microconverter applications note uc004. (2) parallel programming the parallel programming mode is fully compatible with con ven- tional third party flash or eeprom device programmers. a block diagram of the external pin configuration required to sup- port parallel programming is shown in figure 27. in this mode, ports 0, 1, and 2 ope rate as the external data and ad dress bus interface, ale operates as the write enable strobe, and port 3 is used as a general configuration port that configures the device for various program and erase operations during parallel program- ming. table xiii. flash/ee memory parallel programming modes port 3 pins programming 0.7 0.6 0.5 0.4 0.3 0.2 0.1 mode xxxx0 00 erase flash/ee program, data, and security modes xxxx0 01 read device signature/id x x x 1 0 1 0 program code byte x x x 0 0 1 0 program data byte x x x 1 0 1 1 read code byte x x x 0 0 1 1 read data byte xxxx1 00 program security modes xxxx1 01read/v erify security modes all other codes redundant v dd gnd p3 psen reset p0 p1 p2 ale ADUC834 5v program mode (see table xiii) gnd program data (d0 ? d7) program address (a0 ? a13) (p2.0 = a0) (p1.7 = a13) write enable strobe command enable p3.0 negative edge p3.6 entry sequence v dd figure 27. flash/ee memory parallel programming (3) user download mode (uload) as shown in figure 28 the 62kbytes of user program memory is split into two seperate blocks. the upper 6kbytes of the program memory (e000h to f7ffh) is only programmable via serial download or parallel programming. the lower 56kbytes (0000h to dfffh) is also programmable by a third method, user download (uload) mode. programming the flash/ee program memory via is de- scribed in more detail in the description of econ and also in technote uc0xx. ffffh e000h dfffh 0000h user bootloader space. the user bootloader can be pro- grammed via the kernel program or parallel programming but is readonly to user code 6 kbyte f800h f7ffh user download space either the kernel program or user code (in uload mode) can write to this space. kernel program the kernel program can down- load code to the full 62 kbytes of flash/ee program memory. 56 kbyte 2 kbyte 62 kbytes of user code figure 28. flash/ee program memory map flash/ee program memory security the ADUC834 facilitates three modes of flash/ee program memory security. these modes can be independently activated, restricting access to the internal code space. these security modes can be enabled as part of serial download protocol as described in technote uc004 or via parallel programming. the security modes available on the ADUC834 are described as follows: lock mode this mode locks the code memory, disabling parallel program- ming of the program memory. however, reading the memory in parallel mode and reading the memory via a movc command from extrenal memory is still allowed. this mode is deactivated by initiating a ? code-erase ? command in serial download or parallel programming modes. secure mode this mode locks the code memory, disabling parallel program ming of the program memory. reading/verifying the memory in parallel mode and reading the internal memory via a movc command from external memory is also disabled. this mode is deactivated by initiating a ? code-erase ? command in serial download or parallel programming modes. serial safe mode this mode disables serial download capability on the device. if serial safe mode is activated and an attempt is made to reset the part into serial download mode, i.e., reset asserted and de-asserted with psen low, the part will interpret the serial down- load reset as a normal reset only. it will therefore not enter serial download mode but only execute a normal reset sequence. serial safe mode can only be disabled by initiating a code- erase command in parallel programming mode.
rev. p rc (12 march 2002) ADUC834 ? 39 ? preliminary technical data using the flash/ee data memory the 4kbytes of flash/ee data memory is configured as 1024 pages, each of 4 bytes. as with the other ADUC834 peripherals, the interface to this memory space is via a group of registers mapped in the sfr space. a group of four data registers (edata1 ? 4) are used to hold the 4 bytes of data at each page. the page is addressed via the two registers eadrh and eadrl. finally, econ is an 8-bit control register that may be written with one of nine flash/ee memory access commands to trigger various read, write, erase, and verify functions. a block diagram of the sfr interface to the flash/ee data memory array is shown in figure 29. econ ? flash/ee memory control sfr programming of either the flash/ee data memory or the flash/ ee program memory is done through the flash/ee memory control sfr (econ). this sfr allows the user to read, write, erase or verify the 4 kbytes of flash/ee data memory or the 54 kbytes of flash/ee program memory table xiv. flash/ee memory parallel programming modes econ value command description command description (normal mode) (power on default) (uload mode) 01h results in 4 bytes in the flash/ee data memory, not implemented. use the movc instruction read addressed by the page address eadrh/l, being read into edata 1 to 4. 02h results in 4 bytes in edata1-4 being written to the results in bytes 0-255 of internal xram being written write flash/ee data memory, at the page address eadrh/l to the 256 bytes of flash/ee program memory at the (0 eadrh/l<0400h) page address eadrh. (0 eadrh (12 march 2002) rev. p rc ADUC834 ? 40 ? preliminary technical data example: programming the flash/ee data memory a user wishes to write f3h into the second byte on page 03h of the flash/ee data memory space while preserving the other three bytes already in this page. a typical access to the flash/ee data array will involve setting up the page address of the page to be accessed in the eadrh/ l sfrs, configuring the edata1 ? 4 sfrs with data to be pro- grammed to the array (the edata sfrs will not be written for read accesses) and finally, writing the econ command word which initiates one of the nine modes shown in table xiv. step 1: set up the page address: the two address registers eadrh and eadrl hold the high byte address and the low byte address of the page to be ad- dressed. to set the address up in assembly language would appear as follows. mov eadrh,#0 ; set page address pointer mov eadrl,#03h step 2: set up the edata registers: we must now write the 4 values to be written into the page into the 4 sfrs edata1-4. unfortunately we do not know 3 of them. hence we must read the current page and overwrite the second byte. mov econ,#1 ; read page into edata1-4 mov edata2,#0f3h ; overwrite byte 2 step 3:program page: a byte in the flash/ee array can only be programmed if it has previously been erased. to be more specific, a byte can only be programmed if it already holds the value ffh. because of the flash/ee architecture, this erasure must happen at a page level; therefore, a minimum of four bytes (1 page) will be erased when an erase command is initiated. once the page is erased we can program the 4 bytes in page and then perform a verifi- cation of the data. mov econ,#5 ; erase page mov econ,#2 ; write page mov econ,#4 ; verify page mov a, econ ; check if econ=0 (ok!) jnz error note: as with all flash/ee memory architectures, the array can be programmed in-system at a byte level, although it must be erased first; the erasure being performed in page blocks (4- byte pages in this case). although the 4kbytes of flash/ee data memory is shipped from the factory pre-erased, i.e., byte locations set to ffh, it is nonethe less good programming practice to include an erase-all routine as part of any configuration/setup code running on the ADUC834. an ? erase-all ? command consists of writing ? 06h ? to the econ sfr, which initiates an erase of the 4kbyte flash/ee array. this command coded in 8051 assembly would appear as: mov econ,#06h ; erase all command ; 2 ms duration flash/ee memory timing typical program and erase times for the ADUC834 are as fol- lows: normal mode (operating on flash/ee data memory) readpage (4 bytes) ? instruction time + 3 machine cycles writepage (4 bytes) ? 380 s verifypage (4 bytes) ? instruction time + 3 machine cycles erasepage (4 bytes) ? 2ms eraseall (4kbytes) ? 2ms readbyte (1 byte) ? instruction time + 1 machine cycle writebyte (1 byte) ? 200 s uload mode (operating on flash/ee program memory) writepage (256 bytes) ? 15ms erasepage (64 bytes) ? 2ms eraseall (56kbytes) ? 2ms readbyte (1 byte) ? instruction time + 1 machine cycle writebyte (1 byte) ? 200 s it should be noted that a given mode of operation is initiated as soon as the command word is written to the econ sfr. the core microcontroller operation on the ADUC834 is idled until the requested program/read or erase mode is completed. in practice, this means that even though the flash/ee memory mode of operation is typically initiated with a two- machine cycle mov instruction (to write to the econ sfr), the next instruction w ill not be executed until the flash/ee operation is complete. this means that the core will not re spond to interrupt requests until the flash/ee operation is com- plete, although the core peripheral functions like counter/ timers will continue to count and time as configured through- out this pe riod.
rev. p rc (12 march 2002) ADUC834 ? 41 ? preliminary technical data using the d/a converter the on-chip d/a converter architecture consists of a resistor string dac followed by an output buffer amplifier, the func- tional equivalent of which is illustrated in figure 30. output buffer high z disable (from mcu) dac0 r r r r r ADUC834 av dd v ref 20 figure 30. resistor string dac functional equivalent features of this architecture include inherent guaranteed mono- tonicity and excellent differential linearity. as illustrated in figure 30, the reference source for each dac is user selectable in software. it can be either av dd or v ref. in 0-to-av dd mode, the dac output transfer function spans from 0v to the volt- age at the av dd pin. in 0-to-v ref mode, the dac output transfer function spans from 0v to the internal v ref (2.5v). the dac output buffer amplifier features a true rail-to-rail output stage implementation. this means that, unloaded, each output is capable of swinging to within less than 100mv of both av dd and ground. moreover, the dac ? s linearity specification (when driving a 10k ? resistive load to ground) is guaranteed through the full transfer function except codes 0 to 48, and, in 0- to-av dd mode only, codes 3945 to 4095. linearity degradation near ground and v dd is caused by satura- tion of the output amplifier, and a general representation of its effects (neglecting offset & gain error) is illustrated in figure 31. the dotted line in figure 31 indicates the ideal transfer function, and the solid line represents what the transfer func- tion might look like with endpoint non-linearities due to saturation of the output amplifier. dac the ADUC834 incorporates a 12-bit, voltage output dac on- chip. it has a rail-to-rail voltage output buffer capable of driving 10 k ? /100 pf. it has two selectable ranges, 0 v to v ref (the internal bandgap 2.5 v reference) and 0 v to av dd . it can operate in 12-bit or 8-bit mode. the dac has a control regis- ter, daccon, and two data registers, dach/l. the dac output can be programmed to appear at pin 3 or pin 12. it should be noted that in 12-bit mode, the dac voltage output will be updated as soon as the dacl data sfr has been writ- ten; therefore, the dac data registers should be updated as dach first followed by dacl. 5 the 12-bit dac data should be written into dach/l right-justified such that dacl con- tains the lower eight bits, and the lower nibble of dach contains the upper four bits. table xv. daccon sfr bit designations bit name description 7 --- reserved for future use. 6 --- reserved for future use. 5 --- reserved for future use. 4 dacpin dac output pin select. set by the user to direct the dac output to pin 12 (p1.7/ain4/dac). cleared by user to direct the dac output to pin 3 (p1.2/dac/iexc1). 3 dac8 dac 8-bit mode bit. set by user to enable 8-bit dac operation. in this mode the 8-bits in dacl sfr are routed to the 8 msbs of the dac and the 4 lsbs of the dac are set to zero. cleared by user to operate the dac in its normal 12-bit mode of operation. 2 dacrn dac output range bit. set by user to configure dac range of 0 ? av dd . cleared by user to configure dac range of 0 ? 2.5v (v ref ). 1 dacclr dac clear bit. set to ? 1 ? by user to enable normal dac operation. cleared to ? 0 ? by user to reset dac data registers dacl/h to zero. 0 dacen dac enable bit. set to ? 1 ? by user to enable normal dac operation. cleared to ? 0 ? by user to power-down the dac. dach/l dac data registers function dac data registers, written by user to update the dac output. sfr address dacl (dac data low byte) ? >fbh dach (dac data high byte) ? >fch power-on default value 00h ? >both registers bit addressable no ? >both registers
(12 march 2002) rev. p rc ADUC834 ? 42 ? preliminary technical data note that figure 31 represents a transfer function in 0-to-v dd mode only. in 0-to-v ref mode (with v ref < v dd ) the lower non-linearity would be similar, but the upper portion of the transfer function would follow the ? ideal ? line right to the end, showing no signs of endpoint linearity errors. vdd - 50m v vdd - 100mv 50m v 100mv vdd 0v 000 hex fff hex figure 31. endpoint non-linearities due to amplifier saturation. the endpoint non-linearities conceptually illustrated in figure 31 get worse as a function of output loading. most of the ADUC834 ? s datasheet specifications assume a 10k ? resistive load to ground at the dac output. as the output is forced to source or sink more current, the nonlinear regions at the top or bottom (respectively) of figure 31 become larger. with larger current demands, this can significantly limit output voltage swing. figure 32 & figure 33 illustrate this behavior. it should be noted that the upper trace in each of these figures is only valid for an output range selection of 0-to-av dd . in 0- to-v ref mode, dac loading will not cause high-side voltage drops as long as the reference voltage remains below the upper trace in the corresponding figure. for example, if av dd =3v & v ref =2.5v, the high-side voltage will not be affected by loads less than 5ma. but somewhere around 7ma the upper curve in figure 33 drops below 2.5v (v ref ) indicating that at these higher currents the output will not be capable of reaching v ref . 0 1 2 3 4 5 051015 source/sink current [ma] out put v o l t a g e [ v ] dac loaded with 0fff hex dac loaded with 0000 hex figure 32. source and sink current capability with v ref = v dd = 5v 0 1 2 3 0 5 10 15 source/sink current [ma] output voltage [v] dac loaded with 0fff hex dac loaded with 0000 hex figure 33. source & sink current capability with v ref = v dd = 3v for larger loads the current drive capability may not be suffi- cient. in order to increase the source & sink current capability of the dacs an external buffer should be added, as shown in figure 34. 20 ADUC834 21 - + - + figure 34. buffering the dac outputs the dac output buffer also features a high-impedance disable function. in the chip ? s default power-on state, both dacs are disabled, and their outputs are in a high-impedance state (or ? tri-state ? ) where they remain inactive until enabled in soft- ware. this means that if a zero output is desired during power-up or power-down transient conditions, then a pull-down resistor must be added to each dac output. assuming this resistor is in place, the dac outputs will remain at ground potential whenever the dac is disabled.
rev. p rc (12 march 2002) ADUC834 ? 43 ? preliminary technical data pulse width modulator block (pwm) the pwm is one of the new features of the ADUC834 over the aduc824. the pwm can be configured as a ? dac with up to 16-bits of resolution or as a pwm with variable resolution. the pwm is widely programmable in terms input clock, clock dividers and pwm mode to produce a highly flexible pwm. a block diagram of the pwm is shown in figure x, with each of the modes explained overleaf. the pwm uses 5 extra sfrs; the control sfr, pwmcon, and 4 data sfrs pwm0h, pwm0l, pwm1h and pwm1l. pwmcon (as described below) controls the different modes as well as the clock frequency. pwm0h/l and pwm1h/l are the data regaisters that deter- mine the outputs at p1.0 and p1.1. p wmcon pwm control sfr sfr address aeh power-on default value 00h bit addressable no table xvi. pwmcon sfr bit designations bit name description 7 - reserved for future use 6 md2 pwm mode bits 5 md1 the md2/1/0 bits choose the pwm mode as follows 4 md0 md2 md1 md0 mode 000m ode 0: pwm disabled 0 0 1 mode 1: single variable resolution pwm 0 1 0 mode 2: twin 8-bit pwm 0 1 1 mode 3: twin 16-bit pwm 1 0 0 mode 4: dual nrz 16-bit ? dac 1 0 1 mode 5: dual 8-bit pwm 110m ode 6: dual rz 16-bit ? dac 1 1 1 reserved for future use 3 cdiv1 pwm clock divider 2 cdiv0 scale the clock source for the pwm counter as shown below. cdiv1 cdiv0 description 0 0 pwm counter = selected clock /1 0 1 pwm counter = selected clock /4 1 0 pwm counter = selected clock /16 1 1 pwm counter = selected clock /64 1 csel1 pwm clock divider 0 csel0 select the clock source for the pwm as shown below. csel1 csel0 description 0 0 pwm clock = f xtal /15 0 1 pwm clock = f xtal 1 0 pwm clock = external interrupt on p3.4/t0 1 1 pwm clock = f vco (12.58mhz) clock select prog divider compare mode pwm0h/l pwm1h/l md2 md1 md0 12.583mhz t0 32.768khz 32.768khz/15 p1.0 p1.1 16 bit pwm counter clksel0 clksel1 clkdiv0 clkdiv1 figure 35. pwm block diagram
(12 march 2002) rev. p rc ADUC834 ? 44 ? preliminary technical data pwm modes of operation mode 0: pwm disblabled the pwm is disabled allowing p1.0 and p1.1 be used as nor- mal. mode 1: single variable resolution pwm in this mode both the pulse length and the cycle time (pe- riod) are programmable in user code allowing the resolution of the pwm to be variable. pwm1h/l sets the period of the output waveform. setting pwm1h/l to 65536 gives a 16-bit pwm with a maximum output rate of 192hz (12.583mhz/65536). setting pwm1h/l to 4096 gives a 12-bit pwm with a maximum output rate of 3072hz (12.583mhz/4096).reducing pwm1h/l reduces the resolution but increases the maxi- mum output rate of the pwm. pwm0h/l sets the width of the output waveform as shown in the diagram below. p1.0 pwm counter pwm1h/l 0 pwm0h/l figure 36. ADUC834 pwm in mode 1 mode 2: twin 8-bit pwm in this mode both the pulse and cycle time (period) are pro- grammable however the maximum resolution of the pwm output is 8-bits. pwm1l sets the period for both pwm outputs. typically this will be set to 255 (ffh) to give an 8-bit pwm although it is possible to reduce this as necessary. a value of 100 is loaded here to give a percentage pwm (i.e. the pwm is accurate to 1%). the ouputs of the pwm at p1.0 and p1.1 are shown in the diagram below. as can be seen the output of pwm0 (p1.0) goes low when the pwm counter equals pwm0l. the output of pwm1 (p1.1) goes high when the pwm counter equals pwm1h and goes low again when the pwm counter equals pwm0h. often pwm1h will be set to 0 so that both outputs start simultaneously. p1.1 p1.0 pwm counter pwm1h 0 pwm1l pwm0h pwm0l figure 37. pwm mode 2 mode 3: twin 16-bit pwm in this mode the pulse is programmable but the cycle time (period) is fixed. the pwm counter is fixed to count from 0 to 65536 giving a fixed 16-bit resolution. this means that the maximum output of the pwm is 192hz. as shown below while the pwm counter is less than pwm0h/l then the output of pwm0 (p1.0) is high. once the pwm counter equals pwm0h/l then pwm0 (p1.0) goes low and remains low until the pwm counter is rolls over. similarly while the pwm counter is less than pwm1h/l then the output of pwm1 (p1.1) is high. once the pwm counter equals pwm1h/l then pwm1 (p1.1) goes low and remains low until the pwm counter is rolls over. in this mode pwms must be synchronised. i.e. both pwm0 (p1.0) and pwm1 (p1.1) go high at the same time. p1.1 p1.0 pwm counter pwm1h/l 0 65536 pwm0h/l figure 38. pwm mode 3
rev. p rc (12 march 2002) ADUC834 ? 45 ? preliminary technical data mode 4: dual nrz 16-bit ?? ?? ? dac mode 4 provides a high speed pwm output similar to that of a ? dac. typically this mode will be used with the 12.58mhz clock. in this mode p1.0 and p1.1 are updated every pwm clock (80ns in the case of 12.58mhz). over any 65536 cycles (16 bit pwm) pwm0 (p1.0) is high for pwm0h/l cycles and low for 65536 - pwm0h/l. similarly pwm1 (p1.1) is high for pwm1h/l cycles during this same time. for lower resolution, higher speed dac outputs write 0 ? s to the lsbs that are not required. if for example only 12 bit per- formance is required then write 0 ? s to the 4lsbs. this means that 12 bit accuracy in the pwm output can occur at 3khz. similary writing 0 ? s to the 8lsbs gives 8 bit accuracy at 49khz. e.g. if pwm0h was set to 4010h (slightly above one quater of fs) then typically p1.0 will be low for three clocks and high for one clock (each clock is 80ns appox). over every 65536 clocks the pwm will compromise for the fact that the output should be slightly above one quater of fullscale by leaving the output high for two clocks in four every so often. + latch pwm0h/l 12.583mhz 16 bit 0, , ? , ? , 0 80us 0 0 111 1 1 80us 0 1 00 0 00 16 bit 16 bit 16 bit 16 bit 16 bit 0, , ? , ? , 0 carry out at p1.0 carry out at p1.1 ? pwm1h/l figure 39. pwm mode 4 mode 5: dual 8-bit pwm in this mode both the pulse and cycle time (period) are inde- pendently programmable by using the high and low bytes of the pwm counters independently. the output resolution and period are set by the pwm1l and pwm1h registers for the p1.0 and p1.1 outputs respectively. pwm0l and pwm0h will set the width of the high pulse for the p1.0 and p1.1 outputs respectively. both channels have same clock source and clock divider. p1.1 p1.0 pwm counters pwm1h 0 pwm1l pwm0h pwm0l figure 40. pwm mode 5 mode 6: dual rz 16-bit ?? ?? ? dac mode 6 provides the exact same functionality as mode 4 except that in this mode the pwm output is anded with the pwm clock. i.e. every output 1 is only high for half a clock and low for the other half clock. this return to zero (rz) mode reduces any errors due to mismatch between rise time and fall time of the pwm outputs and is recommended over mode 4 for accurate pwm outputs. the disadvantage of this mode is that the dynamic range of the pwm output is halved from 0->dv dd to 0->dv dd /2. e.g. if pwm0h was set to 4010h (slightly above one quater of fs) then typically p1.0 will be low for three full clocks (3 x 80ns), high for half a clock (40ns) and then low again for half a clock (40ns) before repeating itself. over every 65536 clocks the pwm will compromise for the fact that the out- put should be slightly above one quater of fullscale by leaving the output high for two half clocks in four every so often. + latch pwm0h/l 12.583mhz 16 bit 0, , ? , ? , 0 80us 0 0 111 1 1 80us 0 1 00 000 16 bit 16 bit 16 bit 16 bit 16 bit 0, , ? , ? , 0 carry out at p1.0 carry out at p1.1 ? pwm1h/l figure 41. pwm mode 6
(12 march 2002) rev. p rc ADUC834 ? 46 ? preliminary technical data pllcon pll control register sfr address d7h power-on default value 03h bit addressable no table xvii. pllcon sfr bit designations bit name description 7 osc_pd oscillator power-down bit. set by user to halt the 32 khz oscillator in power-down mode. cleared by user to enable the 32 khz oscillator in power-down mode. this feature allows the tic to continue counting even in power-down mode. 6 lock pll lock bit. this is a read only bit. set automatically at power-on to indicate the pll loop is correctly tracking the crystal clock. if the external crystal becomes subsequently disconnected the pll will rail and the core will halt. cleared automatically at power-on to indicate the pll is not correctly tracking the crystal clock. this may be due to the absence of a crystal clock or an external crystal at power-on. in this mode, the pll output can be 12.58 mhz 20%. 5 --- reserved for future use; should be written with ? 0. ? 4 ltea reading this bit returns the state of the external ea pin latched at reset or power-on. 3 fint fast interrupt response bit. set by user enabling the response to any interrupt to be executed at the fastest core clock frequency, regardless of the configuration of the cd2 ? 0 bits (see below). after user code has returned from an interrupt, the core resumes code execution at the core clock selected by the cd2 ? 0 bits. cleared by user to disable the fast interrupt response feature. 2 cd2 cpu (core clock) divider bits. 1 cd1 this number determines the frequency at which the microcontroller core will operate. 0 cd0 cd2 cd1 cd0 core clock frequency (mhz) 0 0 0 12.582912 0 0 1 6.291456 0 1 0 3.145728 0 1 1 1.572864 (default core clock frequency) 1 0 0 0.786432 1 0 1 0.393216 1 1 0 0.196608 1 1 1 0.098304 on-chip pll the ADUC834 is intended for use with a 32.768 khz watch crystal. a pll locks onto a multiple (384) of this to provide a stable 12.582912 mhz clock for the system. the core can operate at this fr equency or at binary submultiples of it to allow power saving in cases where maximum core perfor- mance is not required. the d efault core clock is the pll clock divided by 8 or 1.572864 mhz. the adc clocks are also derived from the pll clock, with the modulator rate being the same as the crystal o scillator frequency. the above choice of frequencies ensures that the m odulators and the core will be synchronous, regardless of the core clock rate. the pll con- trol register is pllcon.
rev. p rc (12 march 2002) ADUC834 ? 47 ? preliminary technical data time interval counter (tic) a time interval counter is provided on-chip for: - counting longer intervals than the standard 8051-compatible timers are capable of - periodically the part up from power down - implementing a real time clock the tic is capable of timeout intervals ranging from 1/128th second to 255 hours. furthermore, this counter is clocked by the crystal oscillator rather than the pll and thus has the ability to remain active in power-down mode and time long power-down intervals. this has obvious applications for remote battery-powered sensors where regular widely spaced readings are required. if the tic is being used as a real time clock (tcen is set) then the tcen bit itself and the hthsec, sec, min and hour registers do not get reset after a hardware or watchdog timer reset. this is to prevent the need to recalibrate the real time clock after a reset. however, these registers will get reset to 00h after a power cycle (independent of tcen) or after any reset if tcen is clear. six sfrs are associated with the time interval counter, tim econ being its control register. depending on the configuration of the it0 and it1 bits in timecon, the selected time counter register overflow will clock the interval counter. when this counter is equal to the time interval value loaded in the intval sfr, the tii bit (timecon.2) is set and generates an interrupt if enabled (see ieip2 sfr description under interrupt system later in this data sheet.) if the ADUC834 is in power-down mode, again with tic i nterrupt enabled, the tii bit will wake up the device and res ume code execution by vectoring directly to the tic interrupt service vector address at 0053 hex. the tic-related sfrs are de scribed in t able xviii. note also that the timebase sfrs can be written initially with the current time, the tic can then be controlled and accessed by user soft- ware. in effect, this facilitates the imple menta tion of a real-time clock. a block diagram of the tic is shown in figure 42. 8-bit prescaler hundredths counter hthsec second counter sec minute counter min hour counter hour tien interval timeout time interval counter interrupt 8-bit interval counter intval sfr interval timebase selection mux tcen 32.768khz external crystal its0, 1 equal? figure 42. tic, simplified block diagram table xviii. timecon sfr bit designations bit name description 7 --- reserved for future use. 6 --- reserved for future use. for future product code compatibility this bit should be written as a ? 1. ? 5 its1 interval timebase selection bits. 4 its0 written by user to determine the interval counter update rate. its1 its0 interval timebase 0 0 1/128 second 0 1 seconds 1 0 minutes 1 1 hours 3 sti single time interval bit. set by user to generate a single interval timeout. if set, a timeout will clear the tien bit. cleared by user to allow the interval counter to be automatically reloaded and start counting again at each interval timeout. 2 tii tic interrupt bit. set when the 8-bit interval counter matches the value in the intval sfr. cleared by user software. 1 tien time interval enable bit. set by user to enable the 8-bit time interval counter. cleared by user to disable and clear the contents of the interval counter. 0 tcen time clock enable bit. set by user to enable the time clock to the time interval counters. cleared by user to disable the clock to the time interval counters and clear the time interval sfrs. the time registers (hthsec, sec, min and hour) can be written while tcen is low.
(12 march 2002) rev. p rc ADUC834 ? 48 ? preliminary technical data intval user time interval select register function u ser code writes the required time interval to this register. when the 8-bit interval counter is equal to the time interval value loaded in the intval sfr, the tii bit (timecon.2) bit is set and generates an interrupt if enabled. (see ieip2 sfr description under interrupt system later in this data sheet.) sfr address a6h power-on default value 00h bit addressable no valid value 0 to 255 decimal hthsec hundredths seconds time register function this register is incremented in (1/128) second intervals once tcen in timecon is active. the hthsec sfr counts from 0 to 127 before rolling over to increment the sec time register. sfr address a2h power-on default value 00h bit addressable no valid value 0 to 127 decimal sec seconds time register function this register is incremented in 1-second intervals once tcen in timecon is active. the sec sfr counts from 0 to 59 before rolling over to increment the min time register. sfr address a3h power-on default value 00h bit addressable no valid value 0 to 59 decimal min minutes time register function this register is incremented in 1-minute intervals once tcen in timecon is active. the min counts from 0 to 59 before rolling over to increment the hour time register. sfr address a4h power-on default value 00h bit addressable no valid value 0 to 59 decimal hour hours time register function this register is incremented in 1-hour intervals once tcen in timecon is active. the hour sfr counts from 0 to 23 before rolling over to 0. sfr address a5h power-on default value 00h bit addressable no valid value 0 to 23 decimal
rev. p rc (12 march 2002) ADUC834 ? 49 ? preliminary technical data wdcon watchdog timer control register sfr address c0h power-on default value 10h bit addressable yes table xix. wdcon sfr bit designations bit name description 7 pre3 watchdog timer prescale bits. 6 pre2 the watchdog timeout period is given by the equation: t wd = (2 pre (2 9 /f pll )) 5 pre1 (0 pre 7; f pll = 32.768 khz) 4 pre0 pre3 pre2 pre1 pre0 timout period (ms) action 0 0 0 0 15.6 reset or interrupt 0 0 0 1 31.2 reset or interrupt 0 0 1 0 62.5 reset or interrupt 0 0 1 1 125 reset or interrupt 0 1 0 0 250 reset or interrupt 0 1 0 1 500 reset or interrupt 0 1 1 0 1000 reset or interrupt 0 1 1 1 2000 reset or interrupt 1 0 0 0 0.0 immediate reset pre3 ? 0 > 1001 reserved 3 wdir watchdog interrupt response enable bit. if this bit is set by the user, the watchdog will generate an interrupt response instead of a system reset when the watchdog timeout period has expired. this interrupt is not disabled by the clr ea instruction and it is also a fixed, high-priority interrupt. if the watchdog is not being used to monitor the system, it can alternatively be used as a timer. the prescaler is used to set the timeout period in which an interrupt will be generated. (see also note 1, table xxxix in the interrupt system section.) 2 wds watchdog status bit. set by the watchdog controller to indicate that a watchdog timeout has occurred. cleared by writing a ? 0 ? or by an external hardware reset. it is not cleared by a watchdog reset. 1 wde watchdog enable bit. set by user to enable the watchdog and clear its counters. if a ? 1 ? is not written to this bit within the watchdog timeout period, the watchdog will generate a reset or interrupt, depending on wdir. cleared under the following conditions, user writes ? 0, ? watchdog reset (wdir = ? 0 ? ); hardware reset; psm interrupt. 0 wdwr watchdog write enable bit. to write data into the wdcon sfr involves a double instruction sequence. the wdwr bit must be set and the very next instruction must be a write instruction to the wdcon sfr. e.g., clr e a ; disable int errupts while writing ; to wdt setb wdwr ; allow write to wdcon mov wdcon, #72h ; enable wdt for 2.0s timeout setb ea ; enable interrupts again (if rqd) watchdog timer the purpose of the watchdog timer is to generate a device reset or interrupt within a reasonable amount of time if the ADUC834 enters an erroneous state, possibly due to a programming error, e lectrical noise, or rfi. the watchdog function can be disabled by clearing the wde (watchdog enable) bit in the watchdog c ontrol (wdcon) sfr. when enabled; the watchdog circuit will gener ate a system reset or interrupt (wds) if the user program fails to set the watchdog (wde) bit within a predeter- mined amount of time (see pre3 ? 0 bits in wdcon). the watchdog timer itself is a 16-bit counter that is clocked at 32.768 khz. the watchdog time-out interval can be adjusted via the pre3 ? 0 bits in wd con. full control and status of the watchdog timer function can be controlled via the watch- dog timer control sfr (wdcon). the wdcon sfr can only be written by user software if the double write sequence described in wdwr below is initiated on every write access to the wdcon sfr.
(12 march 2002) rev. p rc ADUC834 ? 50 ? preliminary technical data power supply monitor as its name suggests, the power supply monitor, once en- abled, monitors both supplies (avdd or dvdd) on the ADUC834. it will indicate when any of the supply pins drop below one of four user-selectable voltage trip points from 2.63 v to 4.63 v. for correct operation of the power supply monitor function, av dd must be equal to or greater than 2.7 v. monitor function is controlled via the psmcon sfr. if enabled via the ieip2 sfr, the monitor will interrupt the core using the psmi bit in the psmcon sfr. this bit will not be cleared until the failing power supply has returned above the trip point for at least 250 ms. this monitor function allows the user to save working registers to avoid possible data loss due to the low supply condition, and also ensures that normal code execution will not resume until a safe supply level has been well established. the supply monitor is also protected against spurious glitches triggering the interrupt circuit. psmcon power supply monitor control register sfr address dfh power-on default value deh bit addressable no table xx. psmcon sfr bit designations bit name description 7 cmpd dvdd comparator bit this is a read-only bit and directly reflects the state of the dvdd comparator. read ? 1 ? indicates the dvdd supply is above its selected trip point. read ? 0 ? indicates the dvdd supply is below its selected trip point. 6 cmpa avdd comparator bit. this is a read-only bit and directly reflects the state of the avdd comparator. read ? 1 ? indicates the avdd supply is above its selected trip point. read ? 0 ? indicates the avdd supply is below its selected trip point. 5 psmi power supply monitor interrupt bit. this bit will be set high by the microconverter if either cmpa or cmpd are low, indicating low analog or digital supply. the psmi bit can be used to interrupt the processor. once cmpd and/or cmpa return (and remain) high, a 250 ms counter is started. when this counter times out, the psmi interrupt is cleared. psmi can also be written by the user. however, if either com- parator output is low, it is not possible for the user to clear psmi. 4 tpd1 dvdd trip point selection bits. 3 tpd0 these bits select the dvdd trip-point voltage as follows: tpd1 tpd0 selected dvdd trip point (v) 004.63 013.08 102.93 112.63 2 tpa1 avdd trip point selection bits. 1 tpa0 these bits select the avdd trip-point voltage as follows: tpa1 tpa0 selected avdd trip point (v) 004.63 013.08 102.93 1 1 2.63 0 psmen power supply monitor enable bit. set to ? 1 ? by the user to enable the power supply monitor circuit. cleared to ? 0 ? by the user to disable the power supply monitor circuit.
rev. p rc (12 march 2002) ADUC834 ? 51 ? preliminary technical data serial peripheral interface the ADUC834 integrates a complete hardware serial periph- eral interface (spi) interface on-chip. spi is an industry standard synchronous serial interface that allows eight bits of data to be synchronously transmitted and received simultaneously, i.e., full duplex. it should be noted that the spi pins sclock and mosi are multiplexed with the digital output pins d0 and d1. this pins are controlled via the dcon sfr only if spe is clear. spi can be configured for master or slave op eration and typically consists of four pins, namely: sclock (serial clock i/o pin), pin#26 the master clock (sclock) is used to synchronize the data being transmitted and received through the mosi and miso data lines. a single data bit is transmitted and re- ceived in each sclock period. therefore, a byte is transmitted/received after ei ght sclock periods. the sclock pin is configured as an output in master mode and as an input in slave mode. in mas ter mode the bit-rate, polarity and phase of the clock are controlled by the cpol, cpha, spr0 and spr1 bits in the spicon sfr (see table xxi below). in slave mode the spicon register will have to be configured with the phase and polarity (cpha and cpol) as the master as for both master and slave mode the data is transmitted on one edge of the sclock signal and sampled on the other. miso (master in, slave out data i/o pin), pin#14 the miso (master in slave out) pin is configured as an input line in master mode and an output line in slave mode. the miso line on the master (data in) should be connected to the miso line in the slave device (data out). the data is trans- ferred as byte wide (8-bit) serial data, msb first. mosi (master out, slave in pin), pin#27 the mosi (master out slave in) pin is configured as an output line in master mode and an input line in slave mode. the mosi line on the master (data out) should be connected to the mosi line in the slave device (data in). the data is transferred as byte wide (8-bit) serial data, msb first. ssss ssss ss (slave select input pin), pin#13 the slave select ( ss ) input pin is only used when the ADUC834 is configured in spi slave mode. this line is active low. data is only received or transmitted in slave mode when the ss pin is low, allowing the ADUC834 to be used in single master, multislave spi configurations. if cpha = 1 then the ss input may be permanently pulled low. with cpha = 0 then the ss input must be driven low before the first bit in a byte wide transmission or reception and return high again after the last bit in that byte wide transmission or reception. in spi slave mode, the logic level on the external ss pin (pin# 13), can be read via the spr0 bit in the spicon sfr. the following sfr registers are used to control the spi inter face. table xxi. spicon sfr bit designations bit name description 7 ispi spi interrupt bit. set by microconverter at the end of each spi transfer. cleared directly by user code or indirectly by reading the spidat sfr 6 wcol write collision error bit. set by microconverter if spidat is written to while an spi transfer is in progress. cleared by user code. 5 spe spi interface enable bit. set by user to enable the spi interface. cleared by user to allow the dcon sfr control the digital output pins d0 and d1 4 spim spi master/slave mode select bit. set by user to enable master mode operation (sclock is an output). cleared by user to enable slave mode operation (sclock is an input). 3 cpol clock polarity select bit. set by user if sclock idles high. cleared by user if sclock idles low. 2 cpha clock phase select bit. set by user if leading sclock edge is to transmit data. cleared by user if trailing sclock edge is to transmit data. 1 spr1 spi bit-rate select bits. 0 spr0 these bits select the sclock rate (bit-rate) in master mode as follows: spr1 spr0 selected bit rate 00f core /2 01f core /4 10f core /8 1 1 fcore/16 in spi slave mode, i.e., spim = 0, the logic level on the external ss pin (pin# 13), can be read via the spr0 bit. note the cpol and cpha bits should both contain the same values for master and slave devices.
(12 march 2002) rev. p rc ADUC834 ? 52 ? preliminary technical data spidat spi data register function the spidat sfr is written by the user to transmit data over the spi interface or read by user code to read data just received by the spi interface. sfr address f7h power-on default value 00h bit addressable no using the spi interface depending on the configuration of the bits in the spicon sfr shown in table xxi, the ADUC834 spi interface will transmit or receive data in a number of possible modes. fi gure 43 shows all possible ADUC834 spi configurations and the tim- ing relationships and synchronization between the signals involved. also shown in this figure is the spi interrupt bit (ispi) and how it is triggered at the end of each byte-wide commu- nica tion. sclock (cpol = 1) sclock (cpol = 0) (cpha = 1) (cpha = 0) sample input ispi flag data output ispi flag sample input data output ? msb bit 6 bit 5 ? bit 4 bit 3 bit 2 bit 1 lsb msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb ss figure 43. ADUC834, spi timing, all modes spi interface ? master mode in master mode, the sclock pin is always an output and gener- ates a burst of eight clocks whenever user code writes to the spidat register. the sclock bit rate is determined by spr0 and spr1 in spicon. it should also be noted that the ss pin is not used in master mode. if the ADUC834 needs to assert the ss pin on an external slave device, a port digital output pin should be used. in master mode a byte transmission or reception is initiated by a write to spidat. eight clock periods are generated via the sclock pin and the spidat byte being transmitted via m osi. with each sclock period a data bit is also sampled via miso. after eight clocks, the transmitted byte will have been com pletely transmitted and the input byte will be waiting in the input shift register. the ispi flag will be set automatically and an interrupt will occur if enabled. the value in the shift register will be latched into spidat. spi interface ? slave mode in slave mode the sclock is an input. the ss pin must also be driven low externally during the byte communication. transmission is also initiated by a write to spidat. in slave mode, a data bit is transmitted via miso and a data bit is re ceived via mosi through each input sclock period. after eight clocks, the transmitted byte will have been completely transmitted and the input byte will be waiting in the input shift register. the ispi flag w ill be set automatically and an interrupt will occur if enabled. the value in the shift register will be latched into spidat only when the transmission/reception of a byte has been completed. the end of transmission occurs after the eighth clock has been received, if cpha = 1 or when ss re- turns high if cpha = 0.
rev. p rc (12 march 2002) ADUC834 ? 53 ? preliminary technical data table xxii. dpcon sfr bit designations bit name description 7 - reserved for future use 6 dpt data pointer automatic toggle enable cleared by user to disable auto swapping of the dptr. set in user software to enable automatic toggling of the dptr after each each movx or movc instruction. 5 dp1m1 shadow data pointer mode 4 dp1m0 these two bits enable extra modes of the shadow data pointer operation allowing for more compact and more efficient code size and execution. m1 m0 behaviour of the shadow data pointer 0 0 8052 behaviour 0 1 dptr is post incremented after a movx or a movc instruction 1 0 dptr is post decremented after a movx or movc instruction 1 1 dptr lsb is toggled after a movx or movc instruction (this instruction can be useful for moving 8 bit blocks to/from 16-bit devices) 3 dp0m1 main data pointer mode 2 dp0m0 these two bits enable extra modes of the main data pointer operation allowing for more compact and more efficient code size and execution. m1 m0 behaviour of the main data pointer 0 0 8052 behaviour 0 1 dptr is post incremented after a movx or a movc instruction 1 0 dptr is post decremented after a movx or movc instruction 1 1 dptr lsb is toggled after a movx or movc instruction (this instruction can be useful for moving 8 bit blocks to/from 16-bit devices) 1 - not implemented to allow the inc dpcon instruction toggle the data pointer 0 dpsel data pointer select cleared by user to select the main data pointer. this means that the contents of this 24 bit register is placed into the 3 sfrs dpl, dph and dpp. set by the user to select the shadow data pointer. this means that the contents of a separate 24 bit register appears in the 3 sfrs dpl, dph and dpp. dual data pointer the ADUC834 incorporates two data pointers. the second data pointer is a shadow data pointer and is selected via the data pointer control sfr (dpcon). dpcon also includes some nice features such as automatic hardware post increment and post decrement as well as automatic data pointer toggle. dpcon is described below. dpcon data pointer control sfr sfr address a7h power-on default value 00h bit addressable no note 1: this is the only place where the main and shadow data pointers are distinguished. everywhere else in this datasheet wherever the dptr is mentioned, operation on the active dptr is implied. note 2: only movc/movx @dptr instructions are relevant above. movc/movx pc/@ri instructions will not cause the dptr to automatically post increment/decrement etc. to illustrate the operation of dpcon, the following code will copy 256 bytes of code memory at address d000h into xram starting from address 0000h. the following piece of code uses 16 bytes and 2054 cycles. to perform this on a standard 8051 requires approximately 33 bytes and 7172 cycles (depending on how its implemented). mov dptr,#0 ; main dptr = 0 mov dpcon,#55h ; select shadow dptr ; dptr1 increment mode, ; dptr0 increment mode ; dptr auto toggling on mov dptr,#0d000h ; shadow dptr = d000h moveloop: clr a movc a,@a+dptr ; get data ; post inc dptr ; swap to main dptr (data) movx @dptr,a ; put acc in xram ; increment main dptr ; swap shadow dptr (code) mov a, dpl jnz moveloop
(12 march 2002) rev. p rc ADUC834 ? 54 ? preliminary technical data 8051-compatible on-chip peripherals this section gives a brief overview of the various secondary pe- riph eral circuits are also available to the user on-chip. these remaining functions are fully 8051-compatible and are controlled via stan dard 8051 sfr bit definitions. parallel i/o ports 0 ? 3 the ADUC834 uses four input/output ports to exchange data with external devices. in addition to performing general-pur- pose i/o, some ports are capable of external memory operations; others are multiplexed with an alternate function for the periph- eral features on the device. in general, when a peripheral is enabled, that pin may not be used as a general purpose i/o pin. port 0 is an 8-bit open drain bidirectional i/o port that is di- rectly controlled via the p ort 0 sfr (sfr address = 80 hex). port 0 pins that have 1s written to them via the p ort 0 sfr will be configured as open drain and will therefore float. in that state, port 0 pins can be used as high impedance inputs. an external pull-up resistor will be required on p ort 0 outputs to force a valid logic high level externally. port 0 is also the multi- plexed low-order address and data bus during accesses to external program or data memory. in this application it uses strong internal pull-ups when emitting 1s. port 1 is also an 8-bit port directly controlled via the p1 sfr (sfr address = 90 hex). the port 1 pins are divided into two distinct pin groupings. p1.0 and p1.1 pins on port 1 are bidirectional digital i/o pins with internal pull-ups. if p1.0 and p1.1 have 1s written to them via the p1 sfr, these pins are pulled high by the internal pull-up resis- tors. in this state they can also be used as inputs; as input pins being externally pulled low, they will source current because of the internal pull-ups. with 0s written to them, both these pins will drive a logic low output voltage (vol) and will be capable of sinking 10 ma compared to the standard 1.6 ma sink capa- bility on the other port pins. these pins also have various secondary functions described in table xxiii. table xxiii. port 1, alternate pin functions pin alternate function p1.0 t2 (timer/counter 2 external input) pwm0 (pwm0 output at this pin) p1.1 t2ex (timer/counter 2 capture/reload trigger) pwm1 (pwm1 output at this pin) the remaining port 1 pins (p1.2 ? p1.7) can only be configured as analog input (adc), analog output (dac) or digital input pins. by (power-on) default these pins are configured as analog inputs, i.e., ? 1 ? written in the corresponding port 1 register bit. to configure any of these pins as digital inputs, the user should write a ? 0 ? to these port bits to configure the corresponding pin as a high impedance digital input. port 2 is a bidirectional port with internal pull-up resistors di rectly controlled via the p2 sfr (sfr address = a0 hex). port 2 pins that have 1s written to them are pulled high by the internal pull- up resistors and, in that state, they can be used as inputs. as inputs, p ort 2 pins being pulled externally low will source current because of the int ernal pull-up resistors. port 2 emits the high order ad dress bytes during fetches from external pro- gram memory and middle and high order address bytes during accesses to the 16-bit external data memory space. port 3 is a bidirectional port with internal pull-ups directly controlled via the p2 sfr (sfr address = b0 hex). port 3 pins that have 1s written to them are pulled high by the internal pull-ups and in that state they can be used as inputs. as inputs, port 3 pins being pulled externally low will source current be cause of the internal pull-ups. port 3 pins also have various secondary functions described in table xxiv. table xxiv. port 3, alternate pin functions pin alternate function p3.0 rxd (uart input pin) (or serial data i/o in mode 0) p3.1 txd (uart output pin) (or serial clock output in mode 0) p3.2 int0 (external interrupt 0) p3.3 int1 (external interrupt 1) p3.4 t0 (timer/counter 0 external input) p3.5 t1 (timer/counter 1 external input) p3.6 wr (external data memory write strobe) p3.7 rd (external data memory read strobe) the alternate functions of p1.0, p1.1, and port 3 pins can only be activated if the corresponding bit latch in the p1 and p3 sfrs contains a 1. otherwise, the port pin is stuck at 0. in the case of the pwm outputs at p1.0 and p1.1, the pwm outputs will overwrite anything written to p1.0 or p1.1. additional digital ouput pins pins p1.0 and p1.1 can be used to provide high current (10ma sink) general purpose i/o. in addition to p1.0 and p1.1, two more high current (8ma sink) outputs are provided at d0 and d1. if the spe bit (in spicon) is clear, the two extra high current digital ouputs, d0 and d1, are controlled via the dcon sfr as follows: table xxv. dcon sfr description bit name description 7 d1 data written to this bit will be outputted on the d1 pin if d1en is set. 6 d1en set to enable the d1 bit as an ouput. 5 d0 data written to this bit will be outputted on the dc0 pin if d0en is set. 4 ---- ---- 3 d0en set to enable the d0 bit as an ouput. 2 ---- ---- 1 ---- ---- 0 ---- ----
rev. p rc (12 march 2002) ADUC834 ? 55 ? preliminary technical data tmod timer/counter 0 and 1 mode register sfr address 89h power-on default value 00h bit addressable no table xxvi. tmod sfr bit designations bit name description 7 gate timer 1 g ating control. set by software to enable timer/counter 1 only while int1 pin is high and tr1 control bit is set. cleared by software to enable timer 1 whenever tr1 control bit is set. 6c/ t timer 1 timer or counter select bit. set by software to select counter operation (input from t1 pin). cleared by software to select timer operation (input from internal system clock). 5 m1 timer 1 mode select bit 1 (used with m0 bit). 4 m0 timer 1 mode select bit 0. m1 m0 0 0 th1 operates as an 8-bit timer/counter. tl1 serves as 5-bit pre scaler. 0 1 16-bit timer/ counter. th1 and tl1 are cas caded; there is no prescaler. 1 0 8-bit auto- reload timer/counter. th1 holds a value which is to be reloaded into tl1 each time it overflows. 1 1 timer/counter 1 stopped. 3 gate timer 0 g ating control. set by software to enable timer/counter 0 only while int0 pin is high and tr0 control bit is set. cleared by software to enable timer 0 whenever tr0 control bit is set. 2c/ t timer 0 timer or counter select bit. set by software to select counter operation (input from t0 pin). cleared by software to select timer operation (input from internal system clock). 1 m1 timer 0 mode select bit 1. 0 m0 timer 0 mode select bit 0. m1 m0 0 0 th0 operates as an 8-bit timer/counter. tl0 serves as 5-bit prescaler. 0 1 16-bit timer/counter. th0 and tl0 are cascaded; there is no prescaler 1 0 8-bit auto-reload timer/counter. th0 holds a value which is to be reloaded into tl0 each time it overflows. 1 1 tl0 is an 8-bit timer/counter controlled by the standard timer 0 control bits. th0 is an 8-bit timer only, controlled by timer 1 control bits. timers/counters the ADUC834 has three 16-bit timer/counters: timer 0, timer 1, and timer 2. the timer/counter hardware has been included on-chip to relieve the processor core of the over- head inherent in implementing timer/counter functionality in software. each timer/counter consists of two 8-bit registers thx and tlx (x = 0, 1 and 2). all three can be configured to operate either as timers or event counters. in ? timer ? function, the tlx register is incremented every ma- chine cycle. thus one can think of it as counting machine cycles. since a machine cycle consists of 12 core clock periods, the maximum count rate is 1/12 of the core clock frequency. in ? counter ? function, the tlx register is incremented by a 1-to- 0 transition at its corresponding external input pin, t0, t1, or t2. in this function, the external input is sampled during s5p2 of every machine cycle. when the samples show a high in one cycle and a low in the next cycle, the count is incremented. the new count value appears in the register during s3p1 of the cycle following the one in which the transition was detected. since it takes two machine cycles (16 core clock periods) to recognize a 1-to-0 transi tion, the maximum count rate is 1/16 of the core clock frequency. there are no restrictions on the duty cycle of the external input signal, but to ensure that a given level is sampled at least once before it changes, it must be held for a minimum of one full ma chine cycle. remember that the core clock frequency is programmed via the cd0 ? 2 selec- tion bits in the pllcon sfr. user configuration and control of the timers is achieved via three main sfrs. tmod and tcon control the configura- tion of timers 0 and 1 while t2con configures timer 2.
(12 march 2002) rev. p rc ADUC834 ? 56 ? preliminary technical data tcon: timer/counter 0 and 1 control register sfr address 88h power-on default value 00h bit addressable yes table xxvii. tcon sfr bit designations bit name description 7 tf1 timer 1 overflow flag. set by hardware on a timer/counter 1 overflow. cleared by hardware when the program counter (pc) vectors to the interrupt service routine. 6 tr1 timer 1 run control bit. set by user to turn on timer/counter 1. cleared by user to turn off timer/counter 1. 5 tf0 timer 0 overflow flag. set by hardware on a timer/counter 0 overflow. cleared by hardware when the pc vectors to the interrupt service routine. 4 tr0 timer 0 run control bit. set by user to turn on timer/counter 0. cleared by user to turn off timer/counter 0. 3 ie1 1 external interrupt 1 ( int1 ) flag. set by hardware by a falling edge or zero level being applied to external interrupt pin int1 , depend- ing on bit it1 state. cleared by hardware when the when the pc vectors to the interrupt service routine only if the i nter- rupt was transition-activated. if level-activated, the external requesting source controls the request flag, rather than the on-chip hardware. 2it1 1 external interrupt 1 (ie1) trigger type. set by software to specify edge-sensitive detection (i.e., 1-to-0 transition). cleared by software to specify level-sensitive detection (i.e., zero level). 1 ie0 1 external interrupt 0 ( int0 ) flag. set by hardware by a falling edge or zero level being applied to external interrupt pin int0 , depend- ing on bit it0 state. cleared by hardware when the pc vectors to the interrupt service routine only if the interrupt was transition-activated. if level-activated, the external requesting source controls the request flag, rather than the on-chip hardware. 0it0 1 external interrupt 0 (ie0) trigger type. set by software to specify edge-sensitive detection (i.e., 1-to-0 transition). cleared by software to specify level-sensitive detection (i.e., zero level). note 1 these bits are not used in the control of timer/counter 0 and 1, but are used instead in the control and monitoring of the exte rnal int0 and int1 interrupt pins. timer/counter 0 and 1 data registers both timer 0 and timer 1 consists of two 8-bit registers. these can be used as independent registers or combined to be a single 16- bit register depending on the timer mode configuration. th0 and tl0 timer 0 high byte and low byte. sfr address = 8chex, 8ahex respectively. th1 and tl1 timer 1 high byte and low byte. sfr address = 8dhex, 8bhex respectively.
rev. p rc (12 march 2002) ADUC834 ? 57 ? preliminary technical data timer/counter 0 and 1 operating modes the following paragraphs describe the operating modes for timer/counters 0 and 1. unless otherwise noted, it should be assumed that these modes of operation are the same for timer 0 as for timer 1. mode 0 (13-bit timer/counter) mode 0 configures an 8-bit timer/counter with a divide-by-32 pre- scaler. figure 44 shows mode 0 operation.  12 core clk * control p3.4/t0 gate p3.2/ int0 tr0 tf0 tl0 (5 bits) th0 (8 bits) interrupt c/ t = 0 c/ t = 1 * the core clock is the output of the pll as described on page 46 figure 44. timer/counter 0, mode 0 in this mode, the timer register is configured as a 13-bit regis- ter. as the count rolls over from all 1s to all 0s, it sets the timer overflow flag tf0. the overflow flag, tf0, can then be used to request an interrupt. the counted input is enabled to the timer when tr0 = 1 and either gate = 0 or int0 = 1. setting gate = 1 allows the timer to be controlled by external input int0 , to facilitate pulsewidth measurements. tr0 is a control bit in the special function register tcon; gate is in tmod. the 13-bit register consists of all eight bits of th0 and the lower five bits of tl0. the upper three bits of tl0 are indeterminate and should be ignored. setting the run flag (tr0) does not clear the regis- ters. mode 1 (16-bit timer/counter) mode 1 is the same as mode 0, except that the timer register is running with all 16 bits. mode 1 is shown in figure 45.  12 core clk * control p3.4/t0 tf0 tl0 (8 bits) th0 (8 bits) interrupt c/ t = 0 c/ t = 1 gate p3.2/ int0 tr0 * the core clock is the output of the pll as described on page 46 figure 45. timer/counter 0, mode 1 mode 2 (8-bit timer/counter with auto reload) mode 2 configures the timer register as an 8-bit counter (tl0) with automatic reload, as shown in figure 46. overflow from tl0 not only sets tf0, but also reloads tl0 with the contents of th0, which is preset by software. the reload leaves th0 unchanged.  12 core clk * control p3.4/t0 tf0 tl0 (8 bits) interrupt c/ t = 0 c/ t = 1 reload th0 (8 bits) gate p3.2/ int0 tr0 * the core clock is the output of the pll as described on page 46 figure 46. timer/counter 0, mode 2 mode 3 (two 8-bit timer/counters) mode 3 has different effects on timer 0 and timer 1. timer 1 in mode 3 simply holds its count. the effect is the same as setting tr1 = 0. timer 0 in mode 3 establishes tl0 and th0 as two separate counters. this configuration is shown in figure 47. tl0 uses the timer 0 control bits: c/t, gate, tr0, int0 , and tf0. th0 is locked into a timer function (counting machine cycles) and takes over the use of tr1 and tf1 from timer 1. thus, th0 now controls the ? timer 1 ? interrupt. mode 3 is provided for applications requiring an extra 8-bit timer or counter. when timer 0 is in mode 3, timer 1 can be turned on and off by switching it out of, and into, its own mode 3, or can still be used by the serial interface as a baud rate generator. in fact, it can be used, in any application not requiring an interrupt from timer 1 itself.  12 core clk * tl0 (8 bits) tf0 interrupt control p3.4/t0 c/ t = 0 c/ t = 1 th0 (8 bits) tf1 interrupt core clk/12 tr1 core clk/12 control gate p3.2/ int0 tr0 * the core clock is the output of the pll as described on page 46 figure 47. timer/counter 0, mode 3
(12 march 2002) rev. p rc ADUC834 ? 58 ? preliminary technical data timer/counter 2 operating modes the following paragraphs describe the operating modes for timer/ counter 2. the operating modes are selected by bits in the t2con sfr as shown in table xxix. table xxviii. timer 2 operating modes rclk (or) tclk cap2 tr2 mode 0 0 1 16-bit autoreload 0 1 1 16-bit capture 1 x 1 baud rate x x 0 off 16-bit autoreload mode in ? autoreload ? mode, there are two options, which are selected by bit exen2 in t2con. if exen2 = 0, then when timer 2 rolls over it not only sets tf2 but also causes the timer 2 regis ters to be reloaded with the 16-bit value in registers rcap2l and rcap2h, which are preset by software. if exen2 = 1, then timer 2 still performs the above, but with the added feature that a 1-to-0 transition at external input t2ex will also trigger the 16-bit reload and set exf2. the autoreload mode is illustrated in figure 48 below. core clk * 12 t2 pin c/ t2 = 0 c/ t2 = 1 tr2 control tl2 (8-bits) th2 (8-bits) reload tf2 exf2 timer interrupt exen2 control transition detector t2ex pin rcap2l rcap2h * the core clock is the output of the pll as described on page 46 figure 48. timer/counter 2, 16-bit autoreload mode tf2 core clk * 12 t2 pin tr2 control tl2 (8-bits) th2 (8-bits) capture exf2 timer interrupt exen2 control transition detector t2ex pin rcap2l rcap2h c/ t2 = 0 c/ t2 = 1 * the core clock is the output of the pll as described on page 46 figure 49. timer/counter 2, 16-bit capture mode 16-bit capture mode in the ? capture ? mode, there are again two options, which are selected by bit exen2 in t2con. if exen2 = 0, then timer 2 is a 16-bit timer or counter which, upon overflowing, sets bit tf2, the timer 2 overflow bit, which can be used to generate an inter- rupt. if exen2 = 1, then timer 2 still performs the above, but a l-to-0 transition on external input t2ex causes the current value in the timer 2 registers, tl2 and th2, to be captured into regis- ters rcap2l and rcap2h, respectively. in addition, the transition at t2ex causes bit exf2 in t2con to be set, and exf2, like tf2, can generate an interrupt. the capture mode is illustrated in figure 49. the baud rate generator mode is selected by rclk = 1 and/or tclk = 1. in either case if timer 2 is being used to generate the baud rate, the tf2 interrupt flag will not occur. hence timer 2 interrupts will not occur so they do not have to be disabled. in this mode the exf2 flag, however, can still cause interrupts and this can be used as a third external interrupt. baud rate generation will be described as part of the uart serial port operation in the following pages.
rev. p rc (12 march 2002) ADUC834 ? 59 ? preliminary technical data t2con timer/counter 2 control register sfr address c8h power-on default value 00h bit addressable yes table xxix. t2con sfr bit designations bit name description 7 tf2 timer 2 overflow flag. set by hardware on a timer 2 overflow. tf2 will not be set when either rclk or tclk = 1. cleared by user software. 6 exf2 timer 2 external flag. set by hardware when either a capture or reload is caused by a negative transition on t2ex and exen2 = 1. cleared by user user software. 5 rclk receive clock enable bit. set by user to enable the serial port to use timer 2 overflow pulses for its receive clock in serial port modes 1 and 3. cleared by user to enable timer 1 overflow to be used for the receive clock. 4 tclk transmit clock enable bit. set by user to enable the serial port to use timer 2 overflow pulses for its transmit clock in serial port modes 1 and 3. cleared by user to enable timer 1 overflow to be used for the transmit clock. 3 exen2 timer 2 external enable flag. set by user to enable a capture or reload to occur as a result of a negative transition on t2ex if timer 2 is not being used to clock the serial port. cleared by user for timer 2 to ignore events at t2ex. 2 tr2 timer 2 start/stop control bit. set by user to start timer 2. cleared by user to stop timer 2. 1 cnt2 timer 2 timer or counter function select bit. set by user to select counter function (input from external t2 pin). cleared by user to select timer function (input from on-chip core clock). 0 cap2 timer 2 capture/reload select bit. set by user to enable captures on negative transitions at t2ex if exen2 = 1. cleared by user to enable auto-reloads with timer 2 overflows or negative transitions at t2ex when exen2 = 1. when either rclk = 1 or tclk = 1, this bit is ignored and the timer is forced to autoreload on timer 2 overflow. timer/counter 2 data registers timer/counter 2 also has two pairs of 8-bit data registers associated with it. these are used as both timer data registers and timer capture/reload registers. th2 and tl2 timer 2, data high byte and low byte. sfr address = cdhex, cchex respectively. rcap2h and rcap2l timer 2, capture/reload byte and low byte. sfr address = cbhex, cahex respectively.
(12 march 2002) rev. p rc ADUC834 ? 60 ? preliminary technical data uart serial interface the serial port is full duplex, meaning it can transmit and re- ceive simultaneously. it is also receive-buffered, meaning it can commence reception of a second byte before a previously re- ceived byte has been read from the receive register. however, if the first byte still has not been read by the time reception of the second byte is complete, the first byte will be lost. the physical interface to the serial data network is via pins rxd(p3.0) and txd(p3.1) while the sfr interface to the uart is com- prised of the following registers. sbuf the serial port receive and transmit registers are both accessed through the sbuf sfr (sfr address = 99 hex). writing to sbuf loads the transmit register and reading sbuf accesses a physically separate receive register. scon uart serial port control register sfr address 98h power-on default value 00h bit addressable yes table xxx. scon sfr bit designations bit name description 7 sm0 uart serial mode select bits. 6 sm1 these bits select the serial port operating mode as follows: sm0 sm1 selected operating mode 0 0 mode 0: shift register, fixed baud rate (core_clk/2) 0 1 mode 1: 8-bit uart, variable baud rate 1 0 mode 2: 9-bit uart, fixed baud rate (core_clk/64) or (core_clk/32) 1 1 mode 3: 9-bit uart, variable baud rate 5 sm2 multiprocessor communication enable bit. enables multiprocessor communication in modes 2 and 3. in mode 0, sm2 should be cleared. in mode 1, if sm2 is set, ri will not be activated if a valid stop bit was not received. if sm2 is cleared, ri will be set as soon as the byte of data has been received. in modes 2 or 3, if sm2 is set, ri will not be activated if the received ninth data bit in rb8 is 0. if sm2 is cleared, ri will be set as soon as the byte of data has been received. 4 ren serial port receive enable bit. set by user software to enable serial port reception. cleared by user software to disable serial port reception. 3 tb8 serial port transmit (bit 9). the data loaded into tb8 will be the ninth data bit that will be transmitted in modes 2 and 3. 2 rb8 serial port receiver bit 9. the ninth data bit received in modes 2 and 3 is latched into rb8. for mode 1 the stop bit is latched into rb8. 1 ti serial port transmit interrupt flag. set by hardware at the end of the eighth bit in mode 0, or at the beginning of the stop bit in modes 1, 2, and 3. ti must be cleared by user software. 0 ri serial port receive interrupt flag. set by hardware at the end of the eighth bit in mode 0, or halfway through the stop bit in modes 1, 2, and 3. ri must be cleared by software.
rev. p rc (12 march 2002) ADUC834 ? 61 ? preliminary technical data uart operating modes mode 0: 8-bit shift register mode mode 0 is selected by clearing both the sm0 and sm1 bits in the sfr scon. serial data enters and exits through rxd. txd outputs the shift clock. eight data bits are transmitted or re- ceived. transmission is initiated by any instruction that writes to sbuf. the data is shifted out of the rxd line. the eight bits are transmitted with the least-significant bit (lsb) first, as shown in figure 50. core clk ale rxd (data out) tx d (shift clock) data bit 0 data bit 1 data bit 6 data bit 7 s6s5s4s3s2s1s6s5s4s4s3s2s1s6s5s4s3s2s1 machine cycle 8 machine cycle 7 machine cycle 2 machine cycle 1 figure 50. uart serial port transmission, mode 0. reception is initiated when the receive enable bit (ren) is 1 and the receive interrupt bit (ri) is 0. when ri is cleared the data is clocked into the rxd line and the clock pulses are output from the txd line. mode 1: 8-bit uart, variable baud rate mode 1 is selected by clearing sm0 and setting sm1. each data byte (lsb first) is preceded by a start bit(0) and followed by a stop bit(1). therefore 10 bits are transmitted on txd or received on rxd. the baud rate is set by the timer 1 or timer 2 overflow rate, or a combination of the two (one for transmission and the other for reception). transmission is initiated by writing to sbuf. the ? write to sbuf ? signal also loads a 1 (stop bit) into the ninth bit position of the t ransmit shift register. the data is output bit by bit until the stop bit appears on txd and the transmit interrupt flag (ti) is automatically set as shown in figure 51. txd ti (scon.1) start bit d0 d1 d2 d3 d4 d5 d6 d7 stop bit set interrupt i.e. ready for more data figure 51. uart serial port transmission, mode 0. reception is initiated when a 1-to-0 transition is detected on rxd. assuming a valid start bit was detected, character reception continues. the start bit is skipped and the eight data bits are clocked into the serial port shift register. when all eight bits have been clocked in, the following events occur: - the eight bits in the receive shift register are latched into sbuf - the ninth bit (stop bit) is clocked into rb8 in scon - the receiver interrupt flag (ri) is set if, and only if, the following conditions are met at the time the final shift pulse is generated: - ri = 0, and - either sm2 = 0, or sm2 = 1 and the received stop bit = 1. if either of these conditions is not met, the received frame is irretrievably lost, and ri is not set. mode 2: 9-bit uart with fixed baud rate mode 2 is selected by setting sm0 and clearing sm1. in this mode the uart operates in 9-bit mode with a fixed baud rate. the baud rate is fixed at core_clk/64 by default, although by setting the smod bit in pcon, the frequency can be doubled to core_clk/32. eleven bits are transmitted or received, a start bit(0), eight data bits, a programmable ninth bit and a stop bit(1). the ninth bit is most often used as a parity bit, although it can be used for anything, including a ninth data bit if required. to transmit, the eight data bits must be written into sbuf. the ninth bit must be written to tb8 in scon. when transmis- sion is initiated the eight data bits (from sbuf) are loaded onto the transmit shift register (lsb first). the contents of tb8 are loaded into the ninth bit position of the transmit shift register. the transmission will start at the next valid baud rate clock. the ti flag is set as soon as the stop bit appears on txd. reception for mode 2 is similar to that of mode 1. the eight data bytes are input at rxd (lsb first) and loaded onto the receive shift register. when all eight bits have been clocked in, the following events occur: - the eight bits in the receive shift register are latched into sbuf - the ninth data bit is latched into rb8 in scon - the receiver interrupt flag (ri) is set if, and only if, the following conditions are met at the time the final shift pulse is generated: - ri = 0, and - either sm2 = 0, or sm2 = 1 and the received stop bit = 1. if either of these conditions is not met, the received frame is irretrievably lost, and ri is not set. mode 3: 9-bit uart with variable baud rate mode 3 is selected by setting both sm0 and sm1. in this mode the 8051 uart serial port operates in 9-bit mode with a vari able baud rate determined by either timer 1 or timer 2. the opera- tion of the 9-bit uart is the same as for mode 2 but the baud rate can be varied as for mode 1. in all four modes, transmission is initiated by any instruction that uses sbuf as a destination register. reception is initiated in mode 0 by the condition ri = 0 and ren = 1. reception is initiated in the other modes by the incoming start bit if ren = 1. uart serial port baud rate generation mode 0 baud rate generation the baud rate in mode 0 is fixed: mode 0 baud rate = (core clock frequency 1 /12) note 1 in these descriptions core clock frequency refers to the core clock frequency selected via the cd0 ? 2 bits in the pllcon sfr. mode 2 baud rate generation the baud rate in mode 2 depends on the value of the smod bit in the pcon sfr. if smod = 0, the baud rate is 1/64 of the core clock. if smod = 1, the baud rate is 1/32 of the core clock: mode 2 baud rate = (2 smod /64) (core clock frequency) mode 1 and 3 baud rate generation traditionally the baud rates in modes 1 and 3 are determined by the overflow rate in timer 1 or timer 2, or both (one for transmit and the other for receive). on the ADUC834 however the baud rate can also be generated via a seperate baud rate generator to achieve higher baud rates and allow all three be used for other functions.
(12 march 2002) rev. p rc ADUC834 ? 62 ? preliminary technical data baud rate generation using timer 1 and timer 2 timer 1 generated baud rates when timer 1 is used as the baud rate generator, the baud rates in modes 1 and 3 are determined by the timer 1 overflow rate and the value of smod as follows: modes 1 and 3 baud rate = (2 smod /32) (timer 1 overflow rate) the timer 1 interrupt should be disabled in this application. the timer itself can be configured for either timer or counter operation, and in any of its three running modes. in the most typical application, it is configured for timer operation, in the autoreload mode (high nibble of tmod = 0100binary). in that case, the baud rate is given by the formula: modes 1 and 3 baud rate = (2 smod /32) (core clock/(12 [256-th1])) a very low baud rate can also be achieved with timer 1 by leaving the timer 1 interrupt enabled, and configuring the timer to run as a 16-bit timer (high nibble of tmod = 0100binary), and using the timer 1 interrupt to do a 16-bit software reload. table xxxi below, shows some commonly-used baud rates and how they m ight be calculated from a core clock frequency of 1.5728 mhz and 12.58 mhz using timer 1. gen erally speak- ing, a 5% error is tolerable using asynchronous (start/stop) communications. table xxxi. commonly-used baud rates, timer 1 ideal core smod th1-reload actual % baud clk value value baud error 9600 12.58 1 ? 7 (f9h) 9362 2.5 1600 12.58 1 ? 27 (e5h) 1627 1.1 1200 12.58 1 ? 55 (c9h) 1192 0.7 1200 1.57 1 ? 7 (f9h) 1170 2.5 timer 2 generated baud rates baud rates can also be generated using timer 2. using timer 2 is similar to using timer 1 in that the timer must overflow 16 times before a bit is transmitted/received. because timer 2 has a 16-bit autoreload mode a wider range of baud rates is possible using timer 2. modes 1 and 3 baud rate = (1/16) (timer 2 overflow rate) therefore, when timer 2 is used to generate baud rates, the timer increments every two clock cycles and not every core machine cycle as before. hence, it increments six times faster than timer 1, and therefore baud rates six times faster are possible. because timer 2 has 16-bit autoreload capability, very low baud rates are still possible. timer 2 is selected as the baud rate generator by setting the tclk and/or rclk in t2con. the baud rates for transmit and receive can be simultaneously different. setting rclk and/or tclk puts timer 2 into its baud rate generator mode as shown in figure 52. in this case, the baud rate is given by the formula: modes 1 and 3 baud rate = (core clk)/(32 [65536 ? (rcap2h, rcap2l)]) table xxxii shows some commonly used baud rates and how they might be calculated from a core clock frequency of 1.5728 mhz and 12.5829 mhz using timer 2. table xxxii. commonly used baud rates, timer 2 ideal core rcap2h rcap2l actual % baud clk value value baud error 19200 12.58 ? 1 (ffh) ? 20 (ech) 19661 2.4 9600 12.58 ? 1 (ffh) ? 41 (d7h) 9591 0.1 1600 12.58 ? 1 (ffh) ? 164 (5ch) 2398 0.1 1200 12.58 ? 2 (feh) ? 72 (b8h) 1199 0.1 9600 1.57 ? 1 (ffh) ? 5 (fbh) 9830 2.4 1600 1.57 ? 1 (ffh) ? 20 (ech) 1658 2.4 1200 1.57 ? 1 (ffh) ? 41 (d7h) 1199 0.1 core clk * 2 t2 pin tr2 control tl2 (8-bits) th2 (8-bits) reload exen2 control t2ex pin rcap2l rcap2h note: osc. freq. is divided by 2, not 12. timer 2 overflow 2 16 16 rclk tclk rx clock tx clock 0 0 1 1 10 smod timer 1 overflow transition detector exf 2 timer 2 interrupt note availability of additional external interrupt c/ t2 = 0 c/ t2 = 1 * the core clock is the output of the pll as described on page 46 figure 52. timer 2, uart baud rates
rev. p rc (12 march 2002) ADUC834 ? 63 ? preliminary technical data baud rate generation using timer 3 the aduc824 and the aduc816 can only achieve pc baud rates up to 57,600baud. they cannot achieve a baud rate of 115,200. to address this problem the ADUC834 has added a fourth timer specifically for generating high accuracy baudrates. timer 3 can be used instead of timer1 or timer2 for generating the baudrate, allowing a much wider range of baud rates to be accurately obtained. this also frees up the other three timers allowing them to be used for different applications. as shown in figure 53 timer 3 uses a programmable fractional divider to divide the core clock down into a wide range of clocks. these are then passed through a seven stage binary divider. two sfrs (t3con and t3fd) are required to use the timer 3 baud rate generator. t3con is the baud rate control sfr, allowing timer 3 to be used to set up the uart baud rate, and setting up the binary divider (div). t3fd is the fractional divider ratio required to achieve the required baudrate. 2 div (1 + t3fd/64) 32 t3 rx/tx clock core clk * * the core clock is the output of the pll as described on page 46. t3en rx clock tx clock timer 1/timer 2 rx clock (fig 52) fractional divider 0 0 1 1 timer 1/timer 2 tx clock (fig 52) figure 53. timer 3, uart baud rates table xxxiii. t3con sfr bit designations bit name description 7 t3en set to enable timer 3 to generate the baud rate. when set pcon.7, t2con.4 and t2con.5 are ignored. cleared to let the baud rate be generated as per a standard 8052. 6 - 5 - 4 - 3 - 2 div2 binary divider factor 1 div1 div2 div1 div0 bin divider 0 div0 0 0 0 1 0 0 1 2 0 1 0 4 0 1 1 8 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128 the t3fd register writes to the fractional divider. this register can be calculated using the following equation: t3fd = (2 x f vco ) / (baud rate x 2 cd x 2 div ) - 64 where div is the 3 lsbs of the t3con sfr. note: the value of div should be chosen to ensure that: 0 t3fd < 64 or 64 (2 x f vco ) / (baud rate x 2 cd x 2 div ) < 128 e.g. to get a baud rate of 115200 while operating from the maximum core frequency (cd=0) we get: t3fd = 218.45/2 div - 64 therefore choose div = 1 t3fd = 109.22 -64 = 45.22 => 2dh div2-0 = 1 (=>t3con = 81h ) the actual baudrate can then be calculated using the following formula: baud rate = (2 x f vco ) / ((t3fd + 64) x 2 cd x 2 div ) table xxxiv. commonly used baud rates using timer 3 ideal cd div t3con t3fd error baud 230400 0 0 80h 2dh 0.2% 115200 0 1 81h 2dh 0.2% 115200 1 0 80h 2dh 0.2% 57600 0 2 82h 2dh 0.2% 57600 1 1 81h 2dh 0.2% 57600 2 0 80h 2dh 0.2% 38400 0 3 83h 12h 0.1% 38400 1 2 82h 12h 0.1% 38400 2 1 81h 12h 0.1% 38400 3 0 80h 12h 0.1% 19200 0 4 84h 12h 0.1% 19200 1 3 83h 12h 0.1% 19200 2 2 82h 12h 0.1% 19200 3 1 81h 12h 0.1% 19200 4 0 80h 12h 0.1% 9600 0 5 85h 12h 0.1% 9600 1 4 84h 12h 0.1% 9600 2 3 83h 12h 0.1% 9600 3 2 82h 12h 0.1% 9600 4 1 81h 12h 0.1% 9600 5 0 80h 12h 0.1%
(12 march 2002) rev. p rc ADUC834 ? 64 ? preliminary technical data interrupt system the ADUC834 provides a total of eleven interrupt sources with two priority levels. the control and configuration of the interru pt system is carried out through three interrupt-related sfrs. these are the ie (interrupt enable) register, the ip (interrupt pri ority register) and the ieip2 (secondary interrupt enable/priority sfr) registers. there bit definifitions are given in the tables be low. ie: interrupt enable register sfr address a8h power-on default value 00h bit addressable yes table xxxv. ie sfr bit designations bit name description 7 ea written by user to enable ? 1 ? or disable ? 0 ? all interrupt sources 6 eadc written by user to enable ? 1 ? or disable ? 0 ? adc interrupt 5 et2 written by user to enable ? 1 ? or disable ? 0 ? timer 2 interrupt 4 es written by user to enable ? 1 ? or disable ? 0 ? uart serial port interrupt 3 et1 written by user to enable ? 1 ? or disable ? 0 ? timer 1 interrupt 2 ex1 written by user to enable ? 1 ? or disable ? 0 ? external interrupt 1 1 et0 written by user to enable ? 1 ? or disable ? 0 ? timer 0 interrupt 0 ex0 written by user to enable ? 1 ? or disable ? 0 ? external interrupt 0 ip: interrupt priority register sfr address b8h power-on default value 00h bit addressable yes table xxxvi. ip sfr bit designations bit name description 7 --- reserved for future use. 6 padc written by user to select adc interrupt priority ( ? 1 ? = high; ? 0 ? = low) 5 pt2 written by user to select timer 2 interrupt priority ( ? 1 ? = high; ? 0 ? = low) 4 ps written by user to select uart serial port interrupt priority ( ? 1 ? = high; ? 0 ? = low) 3 pt1 written by user to select timer 1 interrupt priority ( ? 1 ? = high; ? 0 ? = low) 2 px1 written by user to select external interrupt 1 priority ( ? 1 ? = high; ? 0 ? = low) 1 pt0 written by user to select timer 0 interrupt priority ( ? 1 ? = high; ? 0 ? = low) 0 px0 written by user to select external interrupt 0 priority ( ? 1 ? = high; ? 0 ? = low) ieip2: secondary interrupt enable and priority register sfr address a9h power-on default value a0h bit addressable no table xxxvii. ieip2 sfr bit designations bit name description 7 --- reserved for future use. 6 pti written by user to select tic interrupt priority ( ? 1 ? = high; ? 0 ? = low). 5 ppsm written by user to select power supply monitor interrupt priority ( ? 1 ? = high; ? 0 ? = low). 4 psi written by user to select spi serial port interrupt priority ( ? 1 ? = high; ? 0 ? = low). 3 --- reserved, this bit must be ? 0. ? 2 eti written by user to enable ? 1 ? or disable ? 0 ? tic interrupt. 1 epsm written by user to enable ? 1 ? or disable ? 0 ? power supply monitor interrupt. 0 esi written by user to enable ? 1 ? or disable ? 0 ? spi serial port interrupt.
rev. p rc (12 march 2002) ADUC834 ? 65 ? preliminary technical data interrupt priority the interrupt enable registers are written by the user to enable individual interrupt sources, while the interrupt priority registers allow the user to select one of two priority levels for each inter- rupt. an interrupt of a high priority may interrupt the service routine of a low priority interrupt, and if two interrupts of differ- ent priority occur at the same time, the higher level interrupt will be serviced first. an interrupt cannot be interrupted by another interrupt of the same priority level. if two interrupts of the same priority level occur simultaneously, a polling se- quence is used to determine which interrupt is serviced first. the polling sequence is shown in table xxxviii. table xxxviii. priority within an interrupt level source priority description psmi 1 (highest) power supply monitor inter rupt wds 2 watchdog interrupt ie0 3 external interrupt 0 rdy0/rdy1 4 adc interrupt tf0 5 timer/counter 0 interrupt ie1 6 external interrupt 1 tf1 7 timer/counter 1 interrupt ispi 8 spi interrupt ri + ti 9 serial interrupt tf2 + exf2 10 timer/counter 2 interrupt tii 11 (lowest) time in terval counter inter rupt . interrupt vectors when an interrupt occurs the program counter is pushed onto the stack and the corresponding interrupt vector address is loaded into the program counter. the interrupt vector addresses are shown in table xxxix. table xxxix. interrupt vector addresses source vector address ie0 0003 hex tf0 000b hex ie1 0013 hex tf1 001b hex ri + ti 0023 hex tf2 + exf2 002b hex rdy0/rdy1 (adc) 0033 hex ispi 003b hex psmi 0043 hex tii 0053 hex wds (wdir = 1) 1 005b hex notes 1 the watchdog can be configured to generate an interrupt instead of a reset when it times out. this is used for logging errors or to examine the internal status of the microcontroller core to understand, from a software debug point of view, why a watchdog timeout occurred. the watchdog interrupt is slightly different from the normal in terrupts in that its priority level is always set to 1 and it is not possible to disable the interrupt via the global disable bit (ea) in the ie sfr. this is done to ensure that the interrupt will always be responded to if a watch dog timeout occurs. the watchdog will only produce an interrupt if the watchdog timeout is greater than zero.
(12 march 2002) rev. p rc ADUC834 ? 66 ? preliminary technical data ADUC834 hardware design considerations this section outlines some of the key hardware design consid- erations that must be addressed when integrating the ADUC834 into any hardware system. external memory interface in addition to its internal program and data memories, the ADUC834 can access up to 64 kbytes of external program memory ( rom/prom/etc.) and up to 16 mbytes of external data memory (sram). to select from which code space (internal or external pro- gram memory) to begin executing instructions, tie the ea (external access) pin high or low, respectively. when ea is high (pulled up to v dd ), user program execution will start at ad- dress 0 of the internal 62 kbytes flash/ee code space. when ea is low (tied to ground) user program execution will start at ad- dress 0 of the external code space. when executing from internal code space accesses to the program space above f7ff hex (62k) will be read as nop instructions. note that a second very important function of the ea pin is described in the single pin emulation mode section of this data sheet. external program memory (if used) must be connected to the ADUC834 as illustrated in figure 54. note that 16 i/o lines (ports 0 and 2) are dedicated to bus functions during external program memory fetches. port 0 (p0) serves as a multiplexed address/data bus. it emits the low byte of the program counter (pcl) as an address, and then goes into a float state awaiting the arrival of the code byte from the program memory. during the time that the low byte of the program counter is valid on p0, the signal ale (address l atch enable) clocks this byte into an ad dress latch. meanwhile, port 2 (p2) emits the high byte of the pro gram counter (pch), then psen strobes the eprom and the code byte is read into the ADUC834. latch eprom oe a8 ? a15 a0 ? a7 d0 ? d7 (instruction) ADUC834 psen p2 ale p0 figure 54. external program memory interface note that program memory addresses are always 16 bits wide, even in cases where the actual amount of program memory used is less than 64 kbytes. external program execution sacrifices two of the 8-bit ports (p0 and p2) to the function of addressing the pro gram memory. while executing from external program memory, ports 0 and 2 can be used simultaneously for read/ write access to external data memory, but not for general-pur- pose i/o. though both external program memory and external data memory are accessed by some of the same pins, the two are completely i ndependent of each other from a software point of view. for example, the chip can read/write external data memory while executing from external program memory. figure 55 shows a hardware configuration for accessing up to 64 kbytes of external ram. this interface is standard to any 8051 compatible mcu. latch sram oe a8 ? a15 a0 ? a7 d0 ? d7 (data) ADUC834 rd p2 ale p0 we wr figure 55. external data memory interface (64 k ad dress space) if access to more than 64 kbytes of ram is desired, a fea- ture unique to the microconverter allows addressing up to 16 mbytes of external ram simply by adding an additional latch as illus trated in figure 56. latch ADUC834 rd p2 ale p0 wr latch sram oe a8 ? a15 a0 ? a7 d0 ? d7 (data) we a16 ? a23 figure 56. external data memory interface (16 m bytes a d dress space) in either implementation, port 0 (p0) serves as a multi- plexed address/data bus. it emits the low byte of the data pointer (dpl) as an address, which is latched by a pulse of ale prior to data being placed on the bus by the ADUC834 (write opera- tion) or the sram (read operation). port 2 (p2) provides the data pointer page byte (dpp) to be latched by ale, fol- lowed by the data pointer high byte (dph). if no latch is connected to p2, dpp is ignored by the sram, and the 8051 standard of 64 kbyte ex ternal data memory access is main- tained. detailed timing diagrams of external program and data memory read and write access can be found in the timing specification sections of this data sheet.
rev. p rc (12 march 2002) ADUC834 ? 67 ? preliminary technical data power supplies the ADUC834 ? s operational power supply voltage range is 2.7 v to 5.25 v. although the guaranteed data sheet specifica- tions are given only for power supplies within 2.7 v to 3.6 v or +5% of the nominal 5 v level, the chip will function equally well at any power supply level between 2.7 v and 5.25 v. separate analog and digital power supply pins (av dd and dv dd respectively) allow av dd to be kept relatively free of noisy digital signals often present on the system dvdd line. in this mode the part can also operate with split supplies; that is, using different voltage supply levels for each supply. for ex- ample, this means that the system can be designed to operate with a dv dd voltage level of 3 v while the av dd level can be at 5 v or vice-versa if re quired. a typical split supply configuration is show in figure 57. dv dd 48 34 20 ADUC834 5 6 agnd av dd ? + 0.1  f 10  f analog supply 10  f dgnd 35 21 47 0.1  f ? + digital supply figure 57. external dual supply connections as an alternative to providing two separate power supplies, av dd can be kept quiet by placing a small series resistor and/or ferrite bead between it and dv dd , and then decoupling av dd separately to ground. an example of this configuration is shown in figure 58. with this configuration other analog circuitry (such as op-amps, voltage reference, etc.) can be powered from the av dd supply line as well. dv dd 48 34 20 ADUC834 5 6 agnd av dd 0.1  f 10  f dgnd 35 21 47 0.1  f ? + digital supply 10  f 1.6 bead figure 58. external single supply connections notice that in both figure 57 and figure 58, a large value (10 f) reservoir capacitor sits on dv dd and a separate 10 f capacitor sits on av dd . also, local small-value (0.1 f) capacitors are located at each vdd pin of the chip. as per standard design prac- tice, be sure to include all of these capacitors, and ensure the smaller capacitors are closest to each av dd pin with trace lengths as short as possible. connect the ground terminal of each of these capacitors directly to the underlying ground plane. finally, it should also be noticed that, at all times, the analog and digital ground pins on the ADUC834 should be referenced to the same system ground reference point. power-on reset operation an internal por (power-on reset) is implemented on the ADUC834. for dv dd below 2.63v the internal por will hold the ADUC834 in reset. as dv dd rises above 2.63v an internal timer will timeout for approx 128ms before the part is released from reset. the user must ensure that the power supply must have reached at least a 2.7 v level by this time. power consumption the ? core ? values given on the spec pages represent the cur- rent drawn by dv dd , while the rest ( ? adc ? , and ? dac ? ) are pulled by the av dd pin and can be disabled in software when not in use. the other on-chip peripherals (watchdog timer, power supply monitor, etc.) consume negligible current and are there fore lumped in with the ? core ? operating current here. of course, the user must add any currents sourced by the paral- lel and serial i/o pins, and that so urced by the dac, in order to determine the total current needed at the ADUC834 ? s sup- ply pins. also, current draw from the dv dd supply will increase by approximately 5 ma d uring flash/ee erase and program cycles power-saving modes setting the idle and power-down mode bits, pcon.0 and pcon.1 respectively, in the pcon sfr described in table ii, allows the chip to be switched from normal mode into idle mode, and also into full power-down mode. in idle mode, the oscillator continues to run, but the core clock generated from the pll is halted. the on-chip peripherals con- tinue to receive the clock, and remain functional. the cpu st atus is preserved with the stack pointer, program counter, and all other internal registers maintain their data during idle mode. port pins and dac output pins also retain their states, and ale and psen outputs go high in this mode. the chip will recover from idle mode upon receiving any enabled interrupt, or on receiving a hardware reset. in power-down mode, both the pll and the clock to the core are stopped. the on-chip oscillator can be halted or can con tinue to oscillate depending on the state of the oscillator power-down bit (osc_pd) in the pllcon sfr. the tic, being driven directly from the oscillator, can also be enabled during power- down. all other on-chip peripherals however, are shut down. port pins retain their logic levels in this mode, but the dac output goes to a high-impedance state (three-state) while ale and psen outputs are held low. during full power-down mode, the ADUC834 typically consumes a total of 15 a. there are five ways of terminating power-down mode: asserting the reset pin (#15) returns to normal mode all registers are set to their default state and program execution starts at the reset vector once the reset pin is de-asserted. cycling power all registers are set to their default state and program execution starts at the reset vector approximately 128ms later. time interval counter (tic) interrupt power-down mode is terminated and the cpu services the tic interrupt. the reti at the end of the tic isr will return the core to the instruction after that which enabled power down. spi interrupt power-down mode is terminated and the cpu services the spi interrupt. the reti at the end of the isr will return the core to the instruction after that which enabled power down. it
(12 march 2002) rev. p rc ADUC834 ? 68 ? preliminary technical data should be noted that the spi power down interrupt enable bit (seripd) in the pcon sfr must first be set to allow this mode of operation. int0 int0 int0 int0 int0 interrupt power-down mode is terminated and the cpu services the int0 interrupt. the reti at the end of the isr will return the core to the instruction after that which enabled power-down. it should be noted that the int0 power-down interrupt enable bit (int0pd) in the pcon sfr must first be set to allow this mode of operation. grounding and board layout recommendations as with all high resolution data converters, special attention must be paid to grounding and pc board layout of ADUC834-based designs in order to achieve optimum performance from the adcs and dac. although the ADUC834 has separate pins for analog and digital ground (agnd and dgnd), the user must not tie these to two separate ground planes unless the two ground planes are con- nected together very close to the ADUC834, as illustrated in the simplified example of figure 59a. in systems where digital and analog ground planes are connected together somewhere else (at the system ? s power supply for example), they cannot be con- nected again near the ADUC834 since a ground loop would result. in these cases, tie the ADUC834 ? s agnd and dgnd pins all to the analog ground plane, as illustrated in figure 59b. in systems with only one ground plane, ensure that the digital and analog components are physically separated onto separate halves of the board such that digital return currents do not flow near analog circuitry and vice versa. the ADUC834 can then be placed between the digital and analog sections, as illustrated in figure 59c. dgnd place analog com- ponents here a b c agnd dgnd agnd place digital components here place analog components here place digital components here gnd place analog components here place digital com- ponents here figure 59. system grounding schemes in all of these scenarios, and in more complicated real-life appli- cations, keep in mind the flow of current from the supplies and back to ground. make sure the return paths for all currents are as close as possible to the paths the currents took to reach their destinations. for example, do not power components on the analog side of figure 59b with dv dd since that would force return currents from dv dd to flow through agnd. also, try to avoid digital currents flowing under analog circuitry, which could happen if the user placed a noisy digi- tal chip on the left half of the board in figure 59c. whenever possible, avoid large di scontinuities in the ground plane(s) (such as are formed by a long trace on the same layer), since they force return signals to travel a longer path. and of course, make all connections to the ground plane di- rectly, with little or no trace separating the pin from its via to ground. if the user plans to connect fast logic signals (rise/fall time < 5 ns) to any of the ADUC834 ? s digital inputs, add a series resistor to each relevant line to keep rise and fall times longer than 5 ns at the ADUC834 input pins. a value of 100 ? or 200 ? is usually sufficient to prevent high-speed signals from coupling capacitively into the ADUC834 and affecting the accuracy of adc conver sions. ADUC834 system self-identification in some hardware designs it may be an advantage for the software running on the ADUC834 target to identify the host micro converter. for example, code running on the ADUC834 may also be used with the aduc824 or the aduc816 but is required to operate differently. the chipid sfr is a read-only register located at sfr ad- dress c2 h ex. the upper nibble of this sfr is set to 2xhex to designate an ADUC834. clock oscillator as described earlier, the core clock frequency for the ADUC834 is generated from an on-chip pll that locks onto a multiple (384 times) of 32.768 khz. the latter is generated from an internal clock oscillator. to use the internal clock oscillator, connect a 32.768 khz parallel resonant crystal between xtal1 and xtal2 pins (32 and 33) as shown in figure 60. as shown in the typical external crystal connection diagram in figure 60, two internal 12 pf capacitors are provided on-chip. these are connected internally, directly to the xtal1 and xtal2 pins and the total input capacitances at both pins is detailed in the specification section of this data sheet. the value of the total load capacitance required for the external crystal should be the value recommended by the crystal manufacturer for use with that specific crystal. in many cases, because of the on-chip capacitors, additional external load capacitors will not be required. xtal2 xtal1 32.768khz to internal pll ADUC834 12pf 12pf figure 60. external parallel resonant crystal connections
rev. p rc (12 march 2002) ADUC834 ? 69 ? preliminary technical data other hardware considerations to facilitate in-circuit programming, plus in-circuit debug and emulation options, users will want to implement some simple connection points in their hardware that will allow easy access to download, debug, and emulation modes. in-circuit serial download access nearly all ADUC834 designs will want to take advantage of the in-circuit reprogrammability of the chip. this is accomplished by a connection to the ADUC834 ? s uart, which requires an external rs-232 chip for level translation if downloading code from a pc. basic configuration of an rs-232 connection is illustrated in figure 61 with a simple adm202-based circuit. if users would rather not design an rs-232 chip onto a board, refer to the application note ? uc006 ? a 4-wire uart-to-pc interface ? 1 for a sim ple (and zero-cost-per-board) method of gaining in-circuit serial download access to the ADUC834. note 1 application note uc006 is available at www.analog.com/microconverter in addition to the basic uart connections, users will also need a way to trigger the chip into download mode. this is accom plished via a 1 k ? pull-down resistor that can be jumpered onto the psen pin, as shown in figure 61. to get the ADUC834 into download mode, simply connect this jumper and power- cycle the device (or manually reset the device, if a manual reset button is available) and it will be ready to receive a new program serially. with the jumper removed, the device will come up in normal mode (and run the program) whenever power is cycled or re set is toggled. note that psen is normally an output (as described in the external memory interface section) and it is sampled as an input only on the falling edge of reset (i.e., at power-up or upon an exter nal manual reset). note also that if any exter- nal circuitry un intentionally pulls psen low during power-up or reset events, it could cause the chip to enter download mode and therefore fail to begin user code execution as it should. to prevent this, en sure that no external signals are capable of pulling the psen pin low, except for the external psen jumper itself. embedded serial port debugger from a hardware perspective, entry to serial port debug mode is identical to the serial download entry sequence described above. in fact, both serial download and serial port debug modes can be thought of as essentially one mode of operation used in two d ifferent ways. note that the serial port debugger is fully contained on the ADUC834 device, (unlike "rom monitor" type debuggers) and t herefore no external memory is needed to enable in- system debug sessions. single-pin emulation mode also built into the ADUC834 is a dedicated controller for single- pin in-circuit emulation (ice) using standard produc- tion ADUC834 devices. in this mode, emulation access is gained by connection to a single pin, the ea pin. normally, this pin is hard-w ired either high or low to select execution from internal or external program memory space, as described earlier. to enable single-pin emulation mode, however, users will need to pull the ea pin high through a 1 k ? resistor as shown in figure 61. the emulator will then connect to the 2- pin header also shown in figure 61. to be compatible with the standard connector that comes with the single-pin emulator available from accutron limited (www.accutron.com), use a 2- pin 0.1-inch pitch "friction lock" header from molex (www.molex.com) such as their part number 22-27-2021. be sure to observe the polarity of this header. as represented in figure 61, when the friction lock tab is at the right, the ground pin should be the lower of the two pins (when viewed from the top). enhanced-hooks emulation mode ADUC834 also supports enhanced-hooks emulation mode. an enhanced-hooks-based emulator is available from metalink cor- poration (www.metaice.com). no special hardware support for these em ulators needs to be designed onto the board since these are "pod-style" emulators where users must replace the chip on their board with a header device that the emulator pod plugs into. the only hardware concern is then one of determining if adequate space is available for the emulator pod to fit into the system enclosure. typical system configuration a typical ADUC834 configuration is shown in figure 61. it summarizes some of the hardware considerations discussed in the previous paragraphs. figure 61 also includes connections for a typical analog mea- surem ent application of the ADUC834, namely an interface to an rtd (resistive temperature device). the arrangement shown is commonly referred to as a 4-wire rtd configuration. here, the on-chip excitation current sources are enabled to excite the sensor. an external differential reference voltage is generated by the current sourced through resistor r1. this cur- rent also flows di rectly through the rtd, which generates a differential voltage directly proportional to temperature. this differential voltage is routed directly to the positive and nega- tive inputs of the primary adc (ain1, ain2 respectively). a second external resistor, r2, is used to ensure that absolute analog input voltage on the negative input to the primary adc stays within that specified for the ADUC834, i.e., agnd + 100 mv. it should also be noted that variations in the excitation current do not affect the measurement system as the input voltage from the rtd and reference voltage across r1 vary ratiometrically with the excitat ion current. resistor r1 must, however, have a low temperature coefficient to avoid errors in the reference voltage over temperature.
(12 march 2002) rev. p rc ADUC834 ? 70 ? preliminary technical data c1+ v+ c1 ? c2+ c2 ? v ? t2out r2in v cc gnd t1out r1in r1out t1in t2in r2out adm202 dv dd 27 34 33 31 30 29 28 39 38 37 36 35 32 40 47 46 44 43 42 41 52 51 50 49 48 45 dv dd 1k dv dd 1k 2-pin header for emulation access (normally open) download/debug enable jumper (normally open) 32.766khz dv dd 1 9-pin d-sub female 2 3 4 5 6 7 8 9 av dd v ref + a in + a in ? 200  a/400  a excitation current rtd r ref 5.6k av dd agnd p1.2/i exc 1/dac refin ? refin+ p1.4/ain1 p1.5/ain2 dv dd dg n d pse n ea dgnd dv dd xtal2 xtal1 r eset rx d tx d dv dd dg n d not connected in this example ADUC834 p1.3/ain5/dac dv dd rs232 dongle figure 61. typical system configuration
rev. p rc (12 march 2002) ADUC834 ? 71 ? preliminary technical data quickstart development system the quickstart development system is a full featured, low cost development tool suite supporting the ADUC834. the system consists of the following pc-based (windows-compatible) hardw are and software development tools. hardware: ADUC834 evaluation board, and serial port cable code development: 8051 assembler code functionality: adsim, windows microconverter code simulator in-circuit code download: serial downloader in-circuit debugger/emulator: serial port/single pin debugger/emulator with assembly and c source debug misc. other: cd-rom documentation and two additional prototype devices figures 62 shows the typical components of a quickstart devel opment system while figure 63 shows a typical debug session. a brief description of some of the software tools ? components in the quickstart development system is given below. figure 62. components of the quickstart dev system figure. 63. typical debug session download- in circuit downloader the serial downloader is a software program that allows the user to serially download an assembled program (intel hex format file) to the on-chip program flash memory via the serial com1 port on a standard pc. an application note (uc004) detailing this serial download protocol is available from www.analog.com/microconverter. debugger/emulator ? in-circuit debugger/emulator the debugger/emulator is a windows application that allows the user to debug code execution on silicon using the microconverter uart serial port or via a single pin to provide non-intrusive debug. the debugger provides access to all on-chip periph erals dur- ing a typical debug session, including single-step and m ultiple break-point code execution control. c source and assembly level debug are both possible with the emulator. adsim ? windows simulator the simulator is a windows application that fully simulates the microconverter functionality including adc and dac pe- ripherals. the simulator provides an easy-to-use, intuitive, inter face to the microconverter functionality and integrates many standard debug features; including multiple breakpoints, single stepping; and code execution trace capability. this tool can be used both as a tutorial guide to the part as well as an efficient way to prove code functionality before moving to a hardware p latform.
( 12 m a r ch 20 02 ) rev. p r c ? 72 ? ADUC834 outline dimensions dimensions shown in inches and (mm). 52-lead mqfp (s-52) top view (pins dow n) 1 13 14 27 26 39 40 52 pin 1 0.014 (0.35) 0.010 (0.25) 0.557 (14.15) 0.537 (13.65) 0.398 (10.11) 0.390 (9.91) 0 . 55 7 ( 1 4. 1 5 ) 0 . 53 7 ( 1 3. 6 5 ) 0 . 39 8 ( 1 0. 1 1 ) 0 . 39 0 ( 9 . 91 ) 0.0256 (0.65) bsc 0.082 (2.09) 0.078 (1.97) 0.012 (0.30) 0.006 (0.15) 0.008 (0.20) 0.006 (0.15) seating plane 0.037 (0.95) 0.026 (0.65) 0.094 (2.39) 0.084 (2.13)


▲Up To Search▲   

 
Price & Availability of ADUC834

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X